linux - 如何在不支持 ypchsh 的远程计算机中更改 Linux shell

标签 linux bash shell tcsh

<分区>

如何更改远程 PC 中的 shell?我使用 Bash 登录到一个集群,我看到的输出是

elan@l01:~ $ chsh
chsh: can only change local entries; use ypchsh instead.
elan@l01:~ $ ypchsh
-bash: ypchsh: command not found

因为我在那里没有root权限,所以我不能在集群中安装ypchsh。有没有其他方法可以在不调用 ypchsh 的情况下更改 shell?

注1: 浏览时,似乎安装了相同软件的另一个用户(目前无法查询)在他的目录中有 .cshrc,并且设置正确。他的 .bashrc 是最小的,没有重定向。

/etc/passwd 没有我们任何人的条目。

getent passwd

显示我们两个的条目,但只显示/bin/bash。

注2: 该软件是使用 autotools 开发的,已知使用 bash 而不是 tcsh 会创建错误的构建。 (我不换 shell,因为我喜欢它。)

谢谢, 伊兰

最佳答案

在您的 .bashrc 中,将 exec tcsh 放在最后。

关于linux - 如何在不支持 ypchsh 的远程计算机中更改 Linux shell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9942927/

相关文章:

linux - 在 awk 脚本中使用 FILENAME

linux - 如何让我的 shell 脚本检测到多次调用的状态变化?

shell - 如何使用oozie中执行的脚本访问本地目录?

linux - 地址 sanitizer : No matching source file lines in the report after separating debuginfo

linux - 'none' 中的 "mount -t cgroup -o cpuset none/cpuset"是什么意思

c - 64 位段基础的上下文切换的性能影响

linux - printf 行为异常

linux - 如何在linux shell中用新值替换 '-u username -p password'?

linux - Bash 脚本菜单循环

shell - 为什么我的 cron 工作会收到意外的 EOF?