国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
Setting your search path

Setting your search path

The basics of the search path

(Since the notion of the search path is critical for your working environment, we're going to spend a few pages discussing it. You'll thank me for this some day. Really.)

Just as it does in the Windows world, the PATH shell variable represents your command search path -- an ordered, colon-separated list of directories that are searched, left to right, for every command that you execute. Each user has the freedom to define their own personal search path, which you can display as shown below (which also shows a fairly typical example of a search path):

$ echo $PATH/bin:/usr/bin:/usr/X11R6/bin:/home/username/bin:.

 

Typically, the search path begins with a small number of standard system directories such as /bin, /usr/bin and /usr/X11R6/bin, possibly some extra directories for third-party or locally-installed software such as /usr/local/bin and, finally, perhaps a few personally-chosen directories of your own at the end. And who decides what your search path will eventually look like? Your personal search path is typically the end result of piece-by-piece construction by a number of programs and login-time configuration files such as:

  • /bin/login
  • /etc/profile
  • /etc/profile.d/*.sh
  • ~/.bash_profile

The sample list above just emphasizes how many files and programs may have a hand in building the final search path, but it's important to note that you, the user, have the final say since it's your personal .bash_profile startup file that is consulted last.

If, at any time, you want to extend your search path temporarily just for the duration of the rest of this login session, you can add a new entry to the end at the command prompt with (for example):

$ PATH=$PATH:/usr/games

 

If, however, you want to make a permanent change, you should do this in your personal .bash_profile, and your new path will take effect at the next login.

Tip

If you want to execute a program from a directory that is currently not in your search path, there's no need to add that directory to the path. Just type the fully-qualified name of the executable, as in:

$ /usr/games/fortune            

 

Tip

Regardless of what anyone else tells you, there is little value in exporting your PATH variable. This variable is used primarily for locating executable commands, not for passing any useful information to them. It probably won't hurt to export PATH, but it's unlikely to have any benefit.

本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Setting your Path
Linux的Bash Shell詳解
How to Setup Android Build Environment on OS X 10.9 Mavericks – Guide
Ubuntu中root用戶沒有辦法使用命令
Loops in Bash
A list of the commonly used variables in Linux
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服