[英]Using terminal shortcuts with a non-root user
I have added a non-root user to my Linux os to use it for my daily needs.我在我的 Linux 操作系统中添加了一个非 root 用户,以将其用于我的日常需求。 However, I am not able to use shortcuts I am used to.
但是,我无法使用我习惯的快捷方式。
To use my previous codes I normally press UP or DOWN button on my keyboard.要使用我以前的代码,我通常按键盘上的UP或DOWN按钮。 Now with a non-root user, it shows
现在使用非 root 用户,它显示
$ ^[[A // When I press UP arrow
$ ^[[B // or DOWN arrow and so on...
Why a nonroot user cannot use shortcuts and how can I use them
为什么非 root 用户不能使用快捷方式以及如何使用它们
Looks your default shell is not bash.看起来你的默认 shell 不是 bash。 You can check it by running (when not root)
您可以通过运行来检查它(当不是 root 时)
echo $SHELL
or或者
ps -p `echo $$`
My best guess it is ksh.我最好的猜测是 ksh。
You don't have to use bash - but is used by most people as it is most user friendly and should be available for all distros.您不必使用 bash - 但大多数人都在使用它,因为它对用户最友好,并且应该可用于所有发行版。
There are other shells - ksh, csh, tcsh, zsh or fish.还有其他 shell - ksh、csh、tcsh、zsh 或fish。 Last two are nice alternative to bash.
最后两个是 bash 的不错替代品。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.