📜  linux 更改主机名 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:26.989000             🧑  作者: Mango

代码示例2
# login as root and make sure that there are no active processes for user
usermod -l NEW_USERNAME OLD_USERNAME
# if user is running kill user w the following command
userUID=$(id -u OLD_USERNAME) && pkill -U $userUID