什么是正确的地方:
我最近刚刚安装了从 git 存储库下载的 Light Table,并按照本网站上的说明创建了一个桌面启动器。
现在我想通过在终端中直接输入来运行程序
LightTable
Run Code Online (Sandbox Code Playgroud)
并不是
./opt/LightTable/deploy/LightTable
Run Code Online (Sandbox Code Playgroud) 当我们~/.profile在 Ubuntu 中更改某些变量时,我们执行命令source .profile. 那么这个改变只在这个终端有效。如果我们打开一个新终端,我们必须source .profile再次执行该命令。所以看起来不同的终端虽然可能属于同一个用户,但它们都有自己的环境。
让每个终端都有自己的环境路径有什么好处?如果属于同一用户的不同终端共享相同的环境变量,似乎会更好。
我还不是 Linux 人,我在尝试添加新的永久环境变量时遇到了一些问题。
所以我必须用这个值设置一个名为CATALINA_HOME的新环境变量:/opt/apache-tomcat-8.0.23
我该怎么做才能永久设置它?
Tnx
我使用这个答案来快速更改使用的编辑器并且它起作用了,但是现在,当我键入时quickly edit,命令行保持打开状态,并且只要 Sublime Text 2 处于打开状态就不允许我输入其他命令。我意识到这是一个愚蠢的问题,但我似乎无法找到解决它的方法。
我经常需要输入:
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选项中间使用。
谢谢。
我在考虑这个输出的用例:
The program 'tiger' is currently not installed. You can install it by typing:
sudo apt-get install tiger
Run Code Online (Sandbox Code Playgroud)
我怎样才能让它提示我安装那个包?例如它会输出这个:
The program 'tiger' is currently not installed. You can install it by typing:
sudo apt-get install tiger
# Confirmation can go here
[sudo] password for tim:
The following NEW packages will be installed
tiger tripwire
0 to upgrade, 11 to newly install, 0 to remove and 0 not to upgrade.
Need to get 8,416 kB of archives.
After this operation, 26.5 …Run Code Online (Sandbox Code Playgroud) bash ×2
command-line ×2
.profile ×1
alias ×1
directory ×1
java ×1
quickly ×1
shortcuts ×1
sublime-text ×1
text-editor ×1
tomcat ×1