ฉันใช้ Ubuntu 12.04.4 ฉันติดตั้ง tcsh แต่ฉันยังคงเห็นข้อผิดพลาดนี้:
No command 'setenv' found, did you mean:
Command 'netenv' from package 'netenv' (universe)
setenv: command not found
ฉันจะแก้ไขได้อย่างไร
ฉันใช้ Ubuntu 12.04.4 ฉันติดตั้ง tcsh แต่ฉันยังคงเห็นข้อผิดพลาดนี้:
No command 'setenv' found, did you mean:
Command 'netenv' from package 'netenv' (universe)
setenv: command not found
ฉันจะแก้ไขได้อย่างไร
คำตอบ:
คุณมีสองทางเลือก! เรียกใช้csh
เชลล์ที่เข้ากันได้หรือเปลี่ยนไวยากรณ์คำสั่งของคุณ
setenv VARIABLE value
คือcsh
ไวยากรณ์ (และคุณดูเหมือนจะรู้) สำหรับksh
และbash
คำสั่งเทียบเท่าคือ
export VARIABLE=value
ในการรันtcsh
(หลังจากติดตั้งด้วยsudo apt-get install tcsh
) คุณสามารถ
tcsh
ในการสลับเปลือกของคุณเป็นtcsh
" ถาวร "
chsh -s /usr/bin/tcsh
เพื่อสลับกลับไปbash
,
chsh -s /bin/bash