Geo*_*Geo 7 shortcuts alias directory
我经常需要输入:
cd /home/geo/Geant4/geant4.10.00.p02-install/lib/Geant4-10.0.2
Run Code Online (Sandbox Code Playgroud)
如何为该目录创建别名,以便我可以输入:
cd $geant (or any other word I decide to create as the alias name)
Run Code Online (Sandbox Code Playgroud)
它也会在我需要使用时帮助我,cmake
因为我也可以$geant
在cmake
选项中间使用。
谢谢。
打开您的$HOME/.bashrc
并附加:
export GEANT=/home/geo/Geant4/geant4.10.00.p02-install/lib/Geant4-10.0.2
Run Code Online (Sandbox Code Playgroud)
然后运行source ~/.bashrc
,现在你应该可以像这样使用它:
cd $GEANT
Run Code Online (Sandbox Code Playgroud)