ubuntu 新建用户不能使用ll等指令,显示出来的信息没有颜色区分的解决方案 usermod -s

有的文档提示使用 usermod -m 但是不能成功
usermod -m /bin/bash gis1031
Usage: usermod [options] LOGIN


以下为亲测

ubuntu利用 useradd -m test -g admin 指令,创建用户test及其工作目录。
但是登陆后,会出现不能使用很多指令“比如:ll、显示的信息没有颜色”等等
此时
查看该用户的shell是所用的编译器

echo $SHELL #这时会发现使用的/bin/sh

把用户所使用的shell编译器修改成/bin/bash即可

usermod -s /bin/bash test #test是用户名字

此时,在echo $SHELL 一下,就会发现是/bin/bash了。(退出,重新登陆一下)

https://www.aliyun.com/jiaocheng/191346.html

猜你喜欢

转载自blog.csdn.net/qq_23934063/article/details/80827911
今日推荐