1. $PATH
PATH is an environmental variable in Linux and other Unix-like
operating systems that tells the shell which directories to search for
executable files (i.e., ready-to-run programs) in response to commands
issued by a user.
由于我决定将软件安装到’/ opt’,我必须确保在PATH中列出’/ opt’;它不是.我修改了’/ etc / profile’文件
:/选择
在PATH变量的末尾.注意:编辑’/ etc / profile’会影响系统上的所有用户,如果您只想为该特定用户更改该文件,则应使用主目录中的文件.
2.符号链接
Symbolic links are like shortcuts or references to the actual file or
directory. Most of the time these links are transparent when working
with them through other programs… Symbolic links are used all the
time to link libraries and make sure files are in consistent places
without moving or copying the original.
修改$PATH变量只解决了部分问题.添加/选择$PATH变量只添加了该目录,而不是位于其中的特定应用程序.我还需要在/ opt目录中创建一个符号链接 – 或符号链接 – 到特定的应用程序,以便可以在我的应用程序启动器中搜索.
ln -s / opt / applicationFolder / executable / opt / applicationName
这将为位于’/ opt /’目录中的’/ opt / applicationFolder’中的可执行文件创建一个符号链接,其名称为’applicationName’.必须注销/重新启动才能看到更改.
资源: