[英]How to change the directory by default in my Terminal? (command line)
how can I register a specific folder to be the folder by default when I open the Terminal? 打开终端时,如何将特定文件夹注册为默认文件夹?
For now, it is ~
, and I always have to do cd ../../Applications/MAMP/htdocs/
to use the Terminal with my project. 现在,它是
~
,我总是必须执行cd ../../Applications/MAMP/htdocs/
才能将Terminal与我的项目一起使用。
Can I make this "htdocs" the folder by default? 我可以默认将这个“ htdocs”文件夹吗?
您需要修改bash文件~/.bashrc
并添加cd /go/to/my/directory
You can put 你可以放
cd /my/starting/directory
Into ~/.bashrc 进入〜/ .bashrc
Which will be executed each time you start a shell. 每次启动外壳程序时都会执行该命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.