linux學習第一周;linux系統配置類
阿新 • • 發佈:2018-03-17
delet 配置文件 ado conn conf ifcfg enable linux1 gshadow Linux用戶和組的主要配置文件:
/etc/passwd:用戶及其屬性信息(名稱、UID、主組ID等)
/etc/group:組及其屬性信息
/etc/shadow:用戶密碼及其相關屬性
/etc/gshadow:組密碼及其相關屬性
時間同步:
1、ntpdate serverip
2 vim /etc/ntp.conf
3 添加server serverip iburst(serverip表示同步到的主機ip地址)
對於centos6 時間同步
4 server ntpd start
5 chkconfig ntpd on #開機自動啟動
對於centos7 時間同步
4 systemctl start ntpd
5 systemctl enable ntpd # 開機自動啟動
centos 7設置靜態ip地址:
1、nmcli connection show(顯示鏈接,如果有Wired\ connection\ 1和ens33就執行2、3操作;即 把Wired鏈接與ens33全部刪除)
2、nmcli connection delete Wired\ connection\ 1
3、nmcli connection delete ens33
4、vim /etc/sysconfig/network-scripts/ifcfg-eth0(重新建立一個eth0)
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.10.7(可以隨意指定靜態IP地址)
PREFIX=24
5、nmcli connection reload(重新啟動服務)
修改centos7的網卡名稱:
vim /boot/grub2/grub.cfg
linux16 後加 net.ifnames=0
linux學習第一周;linux系統配置類