比较centos与ubuntu的不同

比较centos与ubuntu的不同
1.centos可以使用root登录 ubuntu不能使用root登录
(1)ubuntu开始没有root,只有一个普通用户,需要root时使用sudo,输入密码为普通账号的密码。
(2)新建用户没有sudo权限时需要进/etc/sudores中修改配置文件。我第一次不知道sudo root passwd,进入Grub解决的。
2.网络配置及命令方面
(1)ubuntu的网络配置文件是在/etc/network/interface文件中
DHCP:auto eth0 ;iface eth0 inet dhcp 静态:auto eth0iface;eth0 inet static ;address x.x.x.x ;gateway x.x.x.x ;netmask 255.255.255.0
(2)启动命令 ubuntu是/etc/init.d/networking start|stop|restart service networking start|stop|restart
(3)centos的网络配置文件是/etc/sysconfig/network-scripts/ service network start|stop|restart
(4) 部分查看网络信息相同命令
ip addr //查看IP、掩码、MAC...
ip addr show eth0 //只显示eth0的信息
ip route //查看本机路由表
cat /etc/resolv.conf //查看DNS
hostname //查看主机名
3.自动安装软件
(1)ubuntu使用apt-get;centos使用yum
(2)apt-get install(下载并安装) remove(卸载) upgrade(最新版本) clean(删除所有已下载所有包)update(更新软件包信息)
(3)apt-get配置文件 /etc/sources.list yum /etc/yum.repos.d/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值