Terminal方向键不可用,tab无法补全命令,且界面无颜色

在Linux环境中,遇到终端箭头键不可用和Tab无法补全命令的问题,可能与用户登录Shell设置有关。问题可能源于/bin/bash与/bin/sh的差异,或者在使用adduser和useradd命令时未正确配置。此外,.profile和.bashrc的配置也可能影响终端行为。解决方法包括检查并修改用户登录Shell,以及调整配置文件内容,确保.bashrc正确加载。
摘要由CSDN通过智能技术生成

原因:

1./bin/bash 和 /bin/sh

查看当前登陆shell

cat /etc/passwd|grep [username]
或者

echo $SHELL

That probably means that the new user account was created with /bin/sh as its login shell (which symlinks to the dash shell by default) instead of /bin/bash - you can change a user's login shell with the 'chsh' command

sudo chsh -s /bin/bash <username>

(you will need to log out and back in for the change to take effect). You may also need to copy the default .bashrc from /etc/skel to get the color prompt.

2. adduser 和useradd

In future you might want to use the 'adduser' command instead of 'useradd' - it sets up a more complete user environment including things like a default .profile and .bashrc - as well as set

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值