第1題:描述計算機的組成及功能
1.1計算機的組成
計算機是有 運算器,控制器,存儲器,輸入設備和輸出設備組成計算機
1.2計算機各部件功能
運算器 對數據進行算術運算,邏輯運算和對數據進行加工處理 存儲器 存儲程序,數據和各種信號,命令等信息,并在需要時提供這些信息 控制器 是整個計算機的中樞神經,其動能是對程序規定的控制信息進行解釋,根據要求進行控制, 調度程序、數據、地址,協調計算機各部分工作及內存與外設的訪問等 輸入設備 是將程序、原始數據、文字、字符、控制命令等信息輸入到計算機, 例常見的輸出設備,鼠標、鍵盤等 輸出設備 從計算機輸出各類數據的設備叫做輸出設備。 輸出設備把計算機加工處理的結果(仍然是數字形式的編碼) 變換為人或其它設備所能接收和識別的信息形式如文字、數字、圖形、聲音、電壓等。 常用的輸出設備有顯示器、打印機等。
第2題:按系羅列Linux的發行版本,并描述不同發行 版之間的聯系與區別
2.1linux 的發行版有:
三大主流的發行版本:Slackware, debain, redhat
2.1其之間的聯系與區別:
Slackware: 最老的Linux發行版,主用于桌面、工作站,采用默認桌面則為KED. SUSE: 基于Slackware二次開發的Linux,主用于商業桌面、針對個人用戶。流行于歐洲。 OPEN SUSE: 由SUSE發展而來,主用于桌面環境、桌面較為炫酷,免費。 debian: 互聯網自發組織,最接近原滋原味的Linux,三大發行版中唯一以社區形式運作,不以商業公司形式運作, 是一個致力于創建自由操作系統的合作組織。而且debian開發者所創建的操作系統中絕大部分基礎工具來自于GNU工程。 Ubuntu:Ubuntu是基于debian發行版和gnome桌面環境,沒6個月發行一次新的版本,用于桌面環境。 redhat :是Redhat自己的發行的企業版本,是redhat的一個重要節點。 CentOS:是基于redhat Linux地宮的可自由使用源代碼的企業級linux發行版本,目前已被redhat收購,成為redhat旗下的一個組織。 fedora:主要針對個人用戶,一切新的軟件皆可使用,可用于桌面,工作站,由紅帽公司贊助
第3題:描述linux的哲學思想,并按照自己的理解對其進行解釋性描述
3.1一切皆為文件。注:在計算機系統中所有對象包括硬件都視為文件。
3.2有眾多小程序組成。注:組成眾多的小程序完成復雜的任務。
3.3盡量避免跟用戶的交互。注:盡量不與用戶交互,一個程序一旦運行,就不需要用戶任何操作。
3.4使用文本保存配置信息。注:使用純文本文件保存配置信息,使得程序配置方式更加統一。
第4題:說明linux系統上的命令使用格式;詳細介紹ifconfig,echo,tty, startx,export,pwd,history, shutdown,poweroff,reboot,hwclock,data命令的使用,并配合相應的實例來闡述。
4.1 ifconfig
ifconfig #顯示當前計算機啟用的網卡信息。
[root@localhost ~]# ifconfig eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.16.1.12 netmask 255.255.255.240 broadcast 172.16.1.15 inet6 fe80::20c:29ff:fe2a:bab9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:2a:ba:b9 txqueuelen 1000 (Ethernet) RX packets 17243 bytes 1473492 (1.4 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 10269 bytes 17354288 (16.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 164 bytes 14116 (13.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 164 bytes 14116 (13.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@localhost ~]#
ifconfig -a #顯示當前計算機上的所有網卡信息,包括已經down掉的網卡信息。
[root@localhost ~]# ifconfig -a eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.16.1.12 netmask 255.255.255.240 broadcast 172.16.1.15 inet6 fe80::20c:29ff:fe2a:bab9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:2a:ba:b9 txqueuelen 1000 (Ethernet) RX packets 20288 bytes 1752689 (1.6 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 10557 bytes 17383343 (16.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 216 bytes 18628 (18.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 216 bytes 18628 (18.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4098<BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 00:00:00:00:00:00 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500 ether 52:54:00:c0:37:2f txqueuelen 500 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@localhost ~]#
ifconfig 網卡名稱 #只顯示指定名稱的網卡信息
[root@localhost ~]# ifconfig eno16777736 eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.16.1.12 netmask 255.255.255.240 broadcast 172.16.1.15 inet6 fe80::20c:29ff:fe2a:bab9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:2a:ba:b9 txqueuelen 1000 (Ethernet) RX packets 20369 bytes 1759631 (1.6 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 10593 bytes 17390297 (16.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@localhost ~]#
4.2 echo :回顯請求
echo $SHELL #請求顯示當前是用的shell程序
[root@localhost ~]# echo $SHELL /bin/bash [root@localhost ~]#
echo ‘$SHELL’ #單引號為弱引用,不引用變量值,直接輸出字符串
[root@localhost ~]# echo '$SHELL' $SHELL [root@localhost ~]#
4.3 tty
tty:查看終端設備命令
圖形終端:附加在物理終端之上的以軟件方式虛擬實現的終端,但額外會提供桌面環境,設備文件路徑:/dev/tty#
模擬終端:圖形界面下打開的命令行接口,基于SSH協議或telnet洗衣等遠程打開的界面,設備文件:/dev/pts/# [0 oo)
物理終端:/dev/console
以下是通過SSH登錄的
[root@localhost ~]# tty /dev/pts/1 [root@localhost ~]#
4.4 startx
startx #顯示圖形終端
4.5 export
export #設置顯示環境變量 -p:列出環境變量 -n:刪除一個環境變量
4.6 pwd
pwd #顯示當前工作的目錄位置
[root@localhost ~]# cd /var/log/ [root@localhost log]# pwd /var/log [root@localhost log]#
4.7 history
history #顯示緩存的歷史命令,默認是1000條
-c #清空歷史記錄
-d 數字 #刪除指定的那條命令
-a #將緩存中的歷史命令手動添加到歷史命令文件.bash_history中
history
[root@localhost log]# history 1 cd - 2 cd /home/danry/Desktop/ 3 ls 4 cd - 5 rm -rf * 6 ls 7 ls / 8 cd - 9 mv CentOS7-Base-163.repo /etc/yum.repos.d/ 10 ls 11 cd -
history -d 2
[root@localhost log]# history -d 2 [root@localhost log]# history 1 cd - 2 ls 3 cd - 4 rm -rf * 5 ls 6 ls / 7 cd - 8 mv CentOS7-Base-163.repo /etc/yum.repos.d/ 9 ls 10 cd - 11 yum makecache
history -a
[root@localhost log]# history -a [root@localhost log]# cd [root@localhost ~]# cat .bash_history cd - ls cd - rm -rf * ls ls / cd - mv CentOS7-Base-163.repo /etc/yum.repos.d/ ls cd - yum makecache vim /etc/sysconfig/network-scripts/ifcfg- vim /etc/sysconfig/network-scripts/ifcfg-eno16777736 service network restart yum makecache
history -c
[root@localhost ~]# history -c [root@localhost ~]# history 1 history [root@localhost ~]#
4.8 shutdown :關閉或重啟系統的命令
shutdown -r 10 #十分鐘后重啟系統
shutdown -h 10 #十分鐘后關閉系統
shutdown -c #取消shutdown所有已執行的命令
shutdown -r -10
[root@localhost ~]# date Wed Feb 12 23:23:32 EST 2014 [root@localhost ~]# shutdown -r 10 Shutdown scheduled for Wed 2014-02-12 23:33:34 EST, use 'shutdown -c' to cancel. Broadcast message from root@localhost.localdomain (Wed 2014-02-12 23:23:34 EST): The system is going down for reboot at Wed 2014-02-12 23:33:34 EST! [root@localhost ~]#
shutdown -h 10
[root@localhost ~]# date Wed Feb 12 23:24:23 EST 2014 [root@localhost ~]# shutdown -h 10 Shutdown scheduled for Wed 2014-02-12 23:34:27 EST, use 'shutdown -c' to cancel. Broadcast message from root@localhost.localdomain (Wed 2014-02-12 23:24:27 EST): The system is going down for power-off at Wed 2014-02-12 23:34:27 EST! [root@localhost ~]#
shutdown -c
[root@localhost ~]# shutdown -c Broadcast message from root@localhost.localdomain (Wed 2014-02-12 23:24:53 EST): The system shutdown has been cancelled at Wed 2014-02-12 23:25:53 EST! [root@localhost ~]#
4.9 poweroff :強制關機,有可能丟失數據
4.10 reboot : 強制重啟,有可能丟失數據
4.11 hwclock :顯示計算機的硬件時鐘
hwclock #顯示硬件時間
–set # 設置硬件時間
-s #硬件時間同步到系統時間
-w,–systohc #系統時間同步到硬件時間
4.12 date 顯示系統時間
date #顯示系統時間
date 021223222014.11 #設置系統時間為2014年2月12日23點22分11秒
[root@localhost ~]# date 021223222014.11 Wed Feb 12 23:22:11 EST 2014 [root@localhost ~]#
第5題:如何zailinux系統上獲取命令的幫助信息,請詳細列出,并描述man文檔的章節是如何劃分的
5.1 command –help
ls –help #查看ls命令后可跟什么參數
[root@localhost ~]# ls --help Usage: ls [OPTION]... [FILE]... List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified. Mandatory arguments to long options are mandatory for short options too. -a, --all do not ignore entries starting with . -A, --almost-all do not list implied . and .. --author with -l, print the author of each file -b, --escape print C-style escapes for nongraphic characters --block-size=SIZE scale sizes by SIZE before printing them; e.g., '--block-size=M' prints sizes in units of 1,048,576 bytes; see SIZE format below -B, --ignore-backups do not list implied entries ending with ~ -c with -lt: sort by, and show, ctime (time of last modification of file status information); with -l: show ctime and sort by name; otherwise: sort by ctime, newest first -C list entries by columns --color[=WHEN] colorize the output; WHEN can be 'never', 'auto', or 'always' (the default); more i
5.2 man :命令使用手冊
man command #man的使用格式
man手冊的目錄位置: /usr/share/man
/usr/share/man/下的man1,man2……man8等,
man1 #用戶命令 man2 #系統調用 man3 #c庫調用 man4 #設備文件及特殊文件 man5 #文件格式;(配置文件) man6 #游戲使用幫助 man7 #雜項 man8 #管理工具及守護進行
man ls #查看ls 的使用幫助
LS(1) User Commands LS(1) NAME ls - list directory contents SYNOPSIS ls [OPTION]... [FILE]... DESCRIPTION List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified. Mandatory arguments to long options are mandatory for short options too. -a, --all do not ignore entries starting with . -A, --almost-all do not list implied . and .. --author with -l, print the author of each file -b, --escape print C-style escapes for nongraphic characters --block-size=SIZE scale sizes by SIZE before printing them; e.g., '--block-size=M' prints sizes in units of 1,048,576 bytes; see SIZE format below -B, --ignore-backups Manual page ls(1) line 1 (press h for help or q to quit)
第6題:請羅列linux發行版的基礎目錄名稱命名法則及功用規定
6.1 命名法則
為了保證Linux發行版之間能夠良好的接合,LSB(Linux Standards Base)提供了一種規范,制定了應用程序與運行環境之間的二進制接口。其中 FHS(Filesystem Hierarchy Standard)標準定義了Linux的文件系統規范。
6.2 詳細功用
/boot #用于存放linux的應到文件,包括Kernel、和引導加載程序??梢話燧d獨立的分區。 /bin #存儲管理類的基本命令,OS在啟動時會用到,不能關聯獨立的分區 /sbin #存儲管理類的基本命令,不能關聯獨立分區; /lib #基本共享庫文件,以及內核模塊文件(/lib/modules); /lib64 #作為/lib的補充,專用于x86_64系統上的輔助共享庫文件存放位置; /etc #配置文件目錄(純文本文件); /home #普通用戶的家目錄,通常關聯獨分區; /root #root用戶的家目錄; /media #用于掛載移動式便攜設備,如cdrom、USB等; /mnt #臨時文件系統掛載點; /dev #設備及特殊文件的存儲位置,如終端、鍵盤、硬盤等; /opt #第三方應用程序的安裝位置,逐漸被/usr/local取代; /srv # 系統上運行的服務用到的數據; /tmp #臨時文件存儲位置; /usr # universal shared, read-only data;普通公共程序的存儲位置,如外部命令和安裝的程序等。通常掛載到獨立分區 /var # variable data files;用于存儲頻繁變化的數據,如日志、用戶的郵件、緩存、和pid文件等。通常掛載到獨立分區 /proc #虛擬文件系統,并不真實存儲在硬盤上。為內存的映射,可用于臨時修改或查看kernel的相關配置; /sys #用于輸出當前系統上硬件設備相關信息的虛擬文件系統;
二進制程序文件:
/bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin
庫文件:
/lib, /lib64, /usr/lib, /usr/lib64, /usr/local/lib, /usr/local/lib64
配置文件:
/etc, /etc/DIRECTORY, /usr/local/etc
幫助文件:
/usr/share/man, /usr/share/doc, /usr/local/share/man, /usr/local/share/doc
原創文章,作者:N27_Danry,如若轉載,請注明出處:http://www.www58058.com/79145
總結的非常好的,希望您能牢記這些基礎知識,加油?。?!