Shortly before learning Python, in the Windows environment has learned to install, debugging and so on, when learning to find a lot of configuration in the Linux environment, so install a Linux system for their own learning and memo.
Body
Add user
Useradd Eros
To see if a user was created successfully
ls/home/
Change Password
passwd Eros
Add Sodu Permissions
chmod 640/etc/soduers #修改权限
Vim/etc/sudoers #编辑文件
Add Eros all= (All) all under root all= (All)
chmod sudoers #把权限修改回去
Set up a network
View IP Address
Ifconfig
Edit the/etc/sysconfig/network-scripts/ifcfg-eth0 network card profile (there may be multiple network cards, there are multiple network card profile IFCFG-ETHX)
Vim Etc/sysconfig/network-scripts/ifcfg-eth0
Edit the contents of the modified file as follows: (#号后面为注释) Device=eth0 #对应第一张网卡 (general original file without modification) hwaddr=74:27:ea:44:df:5e # corresponding network card MAC address (general original file without modification) type=ethernet # (general original file without modification) uuid=354c1215-d163-4181-9e26-1c5dccc91c53 # (General original file without modification) Onboot=yes #是否启动时运行NM_CONTROLLED =yes # (general original file without modification) bootproto=static #使用静态IP, Instead of being assigned by DHCP ipipaddr=192.168.4.231 #指定本机IP地址NETMASK =255.255.255.0 #指定子网掩码GATEWAY =192.168.4.1 # Specify Gateway dns1=8.8.8.8 #指定DNS
Restart Network configuration command
Service Network restart
Linux Common commands