偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

淺析Unix操作系統(tǒng)中常見(jiàn)shell

系統(tǒng) 其他OS
Shell在Unix操作系統(tǒng)中很重要,它定義了各種變量和參數(shù),并提供了許多在高階語(yǔ)言中才具有的控制結(jié)構(gòu),包括循環(huán)和分支。

在學(xué)習(xí)Unix操作系統(tǒng)很久之后,我們?cè)絹?lái)越了解Unix操作系統(tǒng),今天,我們要了解Unix操作系統(tǒng)中的Shell知識(shí)。首先我們來(lái)了解下Shell。

Shell俗稱殼(用來(lái)區(qū)別于核),是指“提供使用者使用界面”的軟件(命令解析器)。它類似于DOS下的command.com。它接收用戶命令,然后調(diào)用相應(yīng)的應(yīng)用程序。同時(shí)它又是一種程序設(shè)計(jì)語(yǔ)言。

Shell作為命令語(yǔ)言,它交互式解釋和執(zhí)行用戶輸入的命令或者自動(dòng)地解釋和執(zhí)行預(yù)先設(shè)定好的一連串的命令;作為程序設(shè)計(jì)語(yǔ)言,它定義了各種變量和參數(shù),并提供了許多在高階語(yǔ)言中才具有的控制結(jié)構(gòu),包括循環(huán)和分支。

幾中常見(jiàn)shell在Unix操作系統(tǒng)用戶目錄下的控制文件

 

  1. 1)korn shell (ksh) - .profile .kshrc  
  2. 2)bourne shell (sh) - .profile  
  3. 3)c shell (csh) - .cshrc .login  
  4. 4)bash shell (bash) - .bash_profile .bash_login .profile 

在/etc/skel下,保存了用戶的shell的模版文件。用admintool創(chuàng)建用戶時(shí)Unix操作系統(tǒng)不會(huì)將模版文件復(fù)制到用戶主目錄,而用useradd命令時(shí)Unix操作系統(tǒng)會(huì)將相應(yīng)用戶設(shè)立了的模板復(fù)制到用戶主目錄并改名為相應(yīng)的配置文件,如果想改變環(huán)境,修改這個(gè)文件就可以了.

root的配置文件在/下,如果沒(méi)有,用戶可以自己創(chuàng)建.其他用戶的配置文件在用戶登陸目錄下.

用戶登陸會(huì)先讀Unix操作系統(tǒng)標(biāo)準(zhǔn)配置文件,然后讀自己目錄下的文件,如果用戶設(shè)置和默認(rèn)不同,就改變值,如果用戶沒(méi)有設(shè)置,就用默認(rèn)值.

例如:bash進(jìn)的讀取順序: $HOME/.profile-->/etc/profile

 

  1. bash is a bit different from sh.  
  2. whenever the user log in the system, bash will look for .bash_profile;   
  3. if it doesn't exist, it will look for bash_login;   
  4. if it still doesn't exist, then it will look for .profile.  
  5. if it can find none of them, finally it uses /etc/profile.  
  6. of course, those files are under ${HOME} except /etc/profile. 

這樣,在Unix操作系統(tǒng)中,我們就完成了用戶登陸shell控制文件的知識(shí)講解內(nèi)容。

【編輯推薦】

  1. 解決掉你不要的Unix操作系統(tǒng)進(jìn)程
  2. 利用引用管理Unix操作系統(tǒng)
  3. Unix操作系統(tǒng)元字符管理
  4. Unix操作系統(tǒng)進(jìn)程管理
  5. Unix操作系統(tǒng)進(jìn)程關(guān)閉方法
責(zé)任編輯:小霞
相關(guān)推薦

2010-04-07 11:31:25

Unix操作系統(tǒng)

2010-04-20 15:58:30

Unix操作系統(tǒng)

2010-04-14 16:45:15

Unix操作系統(tǒng)

2010-04-19 17:44:56

Unix操作系統(tǒng)

2010-04-08 16:11:39

Unix操作系統(tǒng)

2010-04-08 17:31:51

Unix操作系統(tǒng)

2010-04-08 17:43:44

Unix操作系統(tǒng)

2010-04-16 14:46:22

2010-04-07 16:15:04

Unix操作系統(tǒng)

2010-04-16 17:03:52

Unix操作系統(tǒng)

2010-05-07 13:04:11

Unix Shell

2010-04-16 16:29:57

Unix操作系統(tǒng)

2010-04-13 12:27:44

Unix操作系統(tǒng)

2010-05-10 17:11:12

2010-04-14 18:01:00

Unix操作系統(tǒng)

2010-04-07 10:42:41

Unix操作系統(tǒng)

2010-04-15 14:40:26

Unix操作系統(tǒng)

2010-04-08 10:42:28

Unix操作系統(tǒng)

2010-04-08 16:18:22

Unix操作系統(tǒng)工具

2010-04-08 17:56:42

Unix操作系統(tǒng)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)