如何解决“找不到setenv命令”错误?(Ubuntu 12.04.4)


14

我使用Ubuntu 12.04.4。我安装了tcsh。但我仍然看到此错误:

No command 'setenv' found, did you mean:
Command 'netenv' from package 'netenv' (universe)
setenv: command not found

我该如何解决?

Answers:


24

您有两种选择!运行csh兼容的Shell,或更改命令的语法。

setenv VARIABLE value

csh语法(您似乎知道)。对于kshbash等价的命令是

export VARIABLE=value

要运行tcsh(使用安装后sudo apt-get install tcsh),您可以

tcsh

要将您的外壳切换为tcsh永久 ”,

chsh -s /usr/bin/tcsh

要切换回bash

chsh -s /bin/bash
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.