Redhat 和 Ubuntu 命令对比

版权声明:本博客为个人原创,转载请注明出处 https://blog.csdn.net/qq_33826564/article/details/84140220

Redhat 和 Ubuntu 命令对比

目录

非交互模式修改root密码

Ubuntu 下
root@ubuntu:~# echo "root:newpassword" | chpasswd

Redhat 下
[root@docker ~]# echo "newpassword" | passwd --stdin root

查看软件包是否已经安装

Ubuntu下
root@ubuntu:~# dpkg -l | grep mysql

Redhat下
[root@docker ~]# rpm -qa | grep mysql

用户和组(添加、删除用户)

Ubuntu下
groupadd -g 999 git
useradd -r -m -u 999 -g git -s /bin/bash git
id git

Redhat下
groupadd -g 999 git
useradd -r -m -u 999 -g 999 -s /bin/bash git        
注:-r:系统账户;-m:创建home目录
userdel -r -f git   
注:-r:移除home目录;-f:强制删除

引用说明:
https://blog.csdn.net/u010000716/article/details/50075249

猜你喜欢

转载自blog.csdn.net/qq_33826564/article/details/84140220