如果是刚安装的系统,是需要更改一下root密码
更改密码命令
sudo passwd root
然后在命令行执行
su root
然就可以了
linux查看本机IP、gateway、dns
查看IP
[root@localhost ~]# ifconfig
查看gateway
[root@localhost ~]# netstat -rn
查看dns
[root@localhost ~]# cat /etc/resolv.conf
sudo passwd root
su root
[root@localhost ~]# ifconfig
[root@localhost ~]# netstat -rn
[root@localhost ~]# cat /etc/resolv.conf