Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我经常使用命令 SOURCE 来打开软件。所以我输入:
源 /usr/blabla/blabla
软件启动
我想知道每次启动终端时是否可以调用源命令。所以我只需要启动 et 终端并输入 softwarelaunch。
这就是文件~/.bashrc的用途!
~/.bashrc
source每次打开终端窗口时,该文件都会得到d。如果要执行,/usr/bla/bla则可以在~/.bashrc文件末尾添加一行:
source
/usr/bla/bla
source /usr/bla/bla
将这样的内容添加到您的~/.bashrc:
if [ -f /usr/local/foo/bar ]; then . /usr/local/foo/bar fi