Setting your Path
来源:百度文库 编辑:神马文学网 时间:2024/04/27 15:22:22
Introduction
The PATH is an environment variable that is a list of directories that the operating system looks in to find commands issued by the user. For example, when you type ls to list files, you are actually executing /bin/ls because the /bin directory is in your path by default.
Setting your Path
The syntax for setting your path is slightly dependent on which shell you are using. The default shell for RedHat 5.x and 6.x is the bash shell. Two other popular shells are tcsh and and csh called "t shell" and "c shell." Thus, these 3 shells are covered here. If you are using a different shell, you can read the man pages by typing man "shellname" to find out the exact syntax. To find out which shell you are running, type the command finger "yourusername" such as "finger tchin" and look at the argument for "Shell:"
For bash shell:
export PATH=$PATH:/usr/sbin/:/usr/local/bin
For tcsh or csh:
set PATH = ($PATH /usr/sbin /usr/local/bin)
These commands can either be typed at the terminal each time you login, or you can add it to your .bashrc for bash shell or .cshrc for csh or tcsh so that each time you login, the PATH is already set. The $PATH means to keep the existing PATH and then append it with the other directories listed. This is helpful if a directory is set in the PATH by the System Administrator for everyone.
What‘s Related
Setting Your Classpath
The PATH is an environment variable that is a list of directories that the operating system looks in to find commands issued by the user. For example, when you type ls to list files, you are actually executing /bin/ls because the /bin directory is in your path by default.
Setting your Path
The syntax for setting your path is slightly dependent on which shell you are using. The default shell for RedHat 5.x and 6.x is the bash shell. Two other popular shells are tcsh and and csh called "t shell" and "c shell." Thus, these 3 shells are covered here. If you are using a different shell, you can read the man pages by typing man "shellname" to find out the exact syntax. To find out which shell you are running, type the command finger "yourusername" such as "finger tchin" and look at the argument for "Shell:"
For bash shell:
export PATH=$PATH:/usr/sbin/:/usr/local/bin
For tcsh or csh:
set PATH = ($PATH /usr/sbin /usr/local/bin)
These commands can either be typed at the terminal each time you login, or you can add it to your .bashrc for bash shell or .cshrc for csh or tcsh so that each time you login, the PATH is already set. The $PATH means to keep the existing PATH and then append it with the other directories listed. This is helpful if a directory is set in the PATH by the System Administrator for everyone.
What‘s Related
Setting Your Classpath
Setting your Path
Setting your search path
Setting Goals with Your Partner
Where Does Your Path Lead?
Servlet path
document and setting 揭密
Boldy - Setting up
ant url path pattern
Path Editor 1.12版
设置PATH环境变量
Your Happiness, Your Responsibility
HTML相对路径(Relative Path)和绝对路径(Absolute Path)
HTML相对路径(relative path)和绝对路径(absolute path)
HTML相对路径(relative path)和绝对路径(absolute path)-H...
Inno Setup添加Path变量
Ancient path towards holy mountain
Maritime News - Sister to Record-Setting Dred...
Ten Big Mistakes #10: Poor Goal Setting
13.Setting the text content of elements
jsp文件开头path, basePath作用
Second Life: Your World. Your Imagination.
Plan your trades and trade your plans
增强系统设置-Setting+使用评测 - Windows Mobile手机软件评测 - ...
When Partners Don’t Cooperate With Setting Goals