红联Linux门户
Linux帮助

Linux Environment Setting

发布时间:2008-05-04 10:04:23来源:红联作者:tljhl
1.In linux ,there are sereral property files for configuration,as bellow:

1.1 /etc/profile . for all users,only the root user can modify it.The configurations in this file is for all users.

1.2. /etc/bashrc. for all users.only root user can modify it
1.3. ~/.bashrc. only for the current user
1.4.~/.bash_profile only for the current user
1.5.~/.bash_logout only for the current user

2
2.1 Environment setting
for example,you can set PATH in abave file.You can only add a line at the end of the file as follows:
PATH=$PATH:/home/ado/...(NOTE: it is colon ,not semicolon)
export PATH
2.2 alias setting
you can use a alias of a complex command as follows:
alias p="pwd"
and then you only to type p to execute the pwd command
2.3 common Environment variables
BASH
BASH_VERSION
EUID
FCEDIT
HISTFILE
HISTFILESIZE
HISTCMD
HOME
HOSTTYPE
MAIL
OLDPWD
OSTYPE
PATH
PPID
PROMPT_COMMAND
PS1
PWD
RANDOM
SECONDS
SHLVL
TMOUT
UID
2.4 define you own Environment variables
AB="/home/ado";export AB
then you can use as follows:$AB

3. bg proces and fg process
you can add & at the end of a command to make it as a demon process or you can use bg command to make a command as a demon process.
you can user jobs command to show all demon process
you can use fg number to bring a demon process to the front,so you can switch between processes
文章评论

共有 0 条评论