如何更改打开gnome-terminal的默认工作目录?


Answers:


23

修改~/.bashrc文件并在末尾添加:

cd /directory/of/your/choice

保存并关闭文件。

现在,每次打开控制台会话时,您将被cd转到该目录。


0

就我而言,~/.bashrc已映射到/root/.bashrc。我$HOME/.bashrc改为通过修改来解决此问题,该映射到/home/{username}/.bashrc

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.