UNIX Introduction

What is UNIX


UNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops.

unix.jpg

Types of UNIX


There are many different versions of UNIX, although they share common similarities. The most popular varieties of UNIX are Sun Solaris, GNU/Linux, and MacOS X.

Here in the School, we use Solaris on our servers and workstations, and Fedora Linux on the servers and desktop PCs.

linux.png

The UNIX operating system


The UNIX operating system is made up of three parts; the kernel, the shell and the programs.

The kernel


The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the filestore and communications in response to system calls.

As an illustration of the way that the shell and the kernel work together, suppose a user types rm myfile (which has the effect of removing the file myfile). The shell searches the filestore for the file containing the program rm, and then requests the kernel, through system calls, to execute the program rm on myfile. When the process rm myfile has finished running, the shell then returns the UNIX prompt % to the user, indicating that it is waiting for further commands.

The shell


The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out. The commands are themselves programs: when they terminate, the shell gives the user another prompt (% on our systems).

The adept user can customise his/her own shell, and users can use different shells on the same machine. Staff and students in the school have the tcsh shell by default.

The tcsh shell has certain features to help the user inputting commands.

Filename Completion - By typing part of the name of a command, filename or directory and pressing the [Tab] key, the tcsh shell will complete the rest of the name automatically. If the shell finds more than one name beginning with those letters you have typed, it will beep, prompting you to type a few more letters before pressing the tab key again.

History - The shell keeps a list of the commands you have typed in. If you need to repeat a command, use the cursor keys to scroll up and down the list or type history for a list of previous commands.

Files and processes


Everything in UNIX is either a file or a process.

  • A process is an executing program identified by a unique PID (process identifier).
  • A file is a collection of data. They are created by users using text editors, running compilers etc.
  • Examples of files:
  • a document (report, essay etc.)
  • the text of a program written in some high-level programming language
  • instructions comprehensible directly to the machine and incomprehensible to a casual user, for example, a collection of binary digits (an executable or binary file);
  • a directory, containing information about its contents, which may be a mixture of other directories (subdirectories) and ordinary files.

The Directory Structure


All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally called root (written as a slash / )

unix-tree.png

In the diagram above, we see that the home directory of the undergraduate student "ee51vn" contains two sub-directories (docs and pics) and a file called report.doc.

The full path to the file report.doc is "/home/its/ug1/ee51vn/report.doc"

Starting an UNIX terminal


To open an UNIX terminal window, click on the "Terminal" icon from Applications/Accessories menus.

gnome-window.gif

An UNIX Terminal window will then appear with a % prompt, waiting for you to start entering commands.

unix-xterm0.gif
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市扶叉,隨后出現(xiàn)的幾起案子勿锅,更是在濱河造成了極大的恐慌,老刑警劉巖枣氧,帶你破解...
    沈念sama閱讀 218,122評論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件溢十,死亡現(xiàn)場離奇詭異,居然都是意外死亡达吞,警方通過查閱死者的電腦和手機(jī)张弛,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,070評論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來宗挥,“玉大人乌庶,你說我怎么就攤上這事种蝶∑豕ⅲ” “怎么了?”我有些...
    開封第一講書人閱讀 164,491評論 0 354
  • 文/不壞的土叔 我叫張陵螃征,是天一觀的道長搪桂。 經(jīng)常有香客問我,道長盯滚,這世上最難降的妖魔是什么踢械? 我笑而不...
    開封第一講書人閱讀 58,636評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮魄藕,結(jié)果婚禮上内列,老公的妹妹穿的比我還像新娘。我一直安慰自己背率,他們只是感情好话瞧,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,676評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著寝姿,像睡著了一般交排。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上饵筑,一...
    開封第一講書人閱讀 51,541評論 1 305
  • 那天埃篓,我揣著相機(jī)與錄音,去河邊找鬼根资。 笑死架专,一個(gè)胖子當(dāng)著我的面吹牛同窘,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播部脚,決...
    沈念sama閱讀 40,292評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼塞椎,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了睛低?” 一聲冷哼從身側(cè)響起案狠,我...
    開封第一講書人閱讀 39,211評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎钱雷,沒想到半個(gè)月后骂铁,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,655評論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡罩抗,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,846評論 3 336
  • 正文 我和宋清朗相戀三年拉庵,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片套蒂。...
    茶點(diǎn)故事閱讀 39,965評論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡钞支,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出操刀,到底是詐尸還是另有隱情烁挟,我是刑警寧澤,帶...
    沈念sama閱讀 35,684評論 5 347
  • 正文 年R本政府宣布骨坑,位于F島的核電站撼嗓,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏欢唾。R本人自食惡果不足惜且警,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,295評論 3 329
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望礁遣。 院中可真熱鬧斑芜,春花似錦、人聲如沸祟霍。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,894評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽浅碾。三九已至大州,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間垂谢,已是汗流浹背厦画。 一陣腳步聲響...
    開封第一講書人閱讀 33,012評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人根暑。 一個(gè)月前我還...
    沈念sama閱讀 48,126評論 3 370
  • 正文 我出身青樓力试,卻偏偏與公主長得像,于是被迫代替她去往敵國和親排嫌。 傳聞我的和親對象是個(gè)殘疾皇子畸裳,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,914評論 2 355

推薦閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,497評論 0 23
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc閱讀 2,860評論 0 0
  • 最近的睡眠不好,可能也不單是最近淳地,從懷孕開始就沒有過好睡眠了怖糊。 躺著的時(shí)候,突然覺得不說話的狀態(tài)最讓自己賞心悅目颇象。...
    樹村閱讀 230評論 2 1
  • 1伍伤、在vm菜單欄選擇Player->管理->安裝VMware Tools 2、終端運(yùn)行不帶參數(shù)的mount命令檢查...
  • 時(shí)間就如白駒過隙倦淀,轉(zhuǎn)眼間蒋畜,2016悄然離去,2017悄然而至晃听“俨啵回首2016砰识,有感慨與無奈能扒,有失望與心酸,當(dāng)然也有成...
    zhongle閱讀 259評論 0 0