红联首页 凝聚Linux人的力量
菜鸟过关 | 精华文档 | 同城人(交友) | 我与Linux的故事 | Linux新闻 | Linux视频 | Linux人才 | 软件下载 | 大学校园 | English
发新话题
打印

Linux Environment Setting

Linux Environment Setting

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

TOP

发新话题