Linux運維歷史和計算機基礎

 

Linux運維歷史和計算機基礎:      程序員

           

        計算機的五大部件;運算中的二進制shell

                        CPU:運算器,控制器apache

                        內存:存儲器ubuntu

                        IO:輸入設備和輸出設備小程序

 

                        寄存器安全

                        內存:編址bash

                                    cell8bits, 1bytes網絡

                                                地址表示less

                                    32bits,64bits運維

                                                2^32=4*2^10*2^10*2^10=4G

                        CPU:

                                    功能:

                                                針腳

                        程序員:程序

                                    程序=指令+數據

            OS的通用性:

                        進程管理、內存管理、驅動程序、網絡協議棧、安全功能

            Linux:

                        Unix-like

                                    Unix元年:197011

                                    Bell,AT&T

                                                SystemV:嫡出

                                                Berkeley:BSRG, BSD:庶出

 

                                                System

 

                                                GNU:GNU is Not Unix

                                                            GPL:General Public License

                                                《硅谷傳奇》

 

                                    Andrew:Minix

                                                Linus,--> Linux

                                                GPL

 

                                    GNU/Linux

                                    https://www.kernel.org/

 

                        Linux主流發行版:

                                    Debian

                                                ubuntu

                                                knoppix

                                    Slackware

                                                S.u.S.E

                                    Redhat

                                                RHEL:RedHat Enterprese Linux

                                                            CentOS:Community ENTerprise Operation System

                                                redhat--> Fedora: 6個月

 

                                    Gentoo

 

                                    ArchLinux

 

                                    LFS

 

            CentOS:

                        6.x: 6.7

                        7.x: 7.1

 

 

 

咱們能夠在虛擬化環境下實現:

            vmware workstation:            vmware12

            virtualbox

                        SUN --> Oracle

                        version: 5

 

            做業:安裝CentOS 6.7 以及 CentOS 7.1

 

問題1CentOSLinux是什麼關係?CentOSRHEL是什麼關係?

 

GNUGNU is Not Unix.

            GNU: GPL

                        GPL: General PublicLicense

 

            自由軟件:

                        自由使用;

                        自由學習和修改;

                        自由分發;

                        自由建立衍生版;

 

            GPL

                        GPLv2, GPLv3,LGPL(lesser)

                                    10000, 10

 

                        ASF: apache license

                        BSD: BSD license

 

            Linux: GPL

                        GNU/Linux

 

            Linux哲學思想:

                        1、一切皆文件:

                        2、由衆多目標單一的小程序組成;

                                    一個程序只作一件事兒,而且作好;

                                    組合小程序完成複雜任務;

                        3、儘可能避免跟用戶交互;

                        4、使用純文本文件保存配置信息;

 

            用戶界面:

                        User Interface: UI

 

                        GUIGraphic UI

                                    GNOME, KDE,XFCE

                        CLI: Command LineInterface

                                    sh(boarn, bsh)

                                    csh

                                    tcsh

                                    ksh

                                    bash(boarn again shell)

                                    zsh

 

                        終端:terminal

                                    物理終端:/dev/console

                                    虛擬終端:/dev/tty#

                                                [1,6]

                                                7

                                                Ctrl+Alt+F#

                                    串行終端:/dev/ttyS#

                                    僞終端:/dev/pts/#

 

                                    tty:顯示當前終端設備;

                                    startx&: 啓動GNOME界面

 

            命令提示符:prompt

                        #: 管理員,擁有管理權限

                        $: 普通用戶,僅可以運行非管理類命令

 

                        [root@localhost ~]PS1環境變量定義的提示格式

 

                        # echo $SHELL:獲取當前正在使用的SHELL程序;

 

                        Note: bash程序經過環境變量來保存環境配置信息;

                                    PS1

                                    SHELL

                                    PATH:保存了許多以冒號分隔的路徑,由bash在查找命令時使用;

 

            命令:

                        輸入命令,回車:

                                    提請bash程序分析給出的命令行信息,找出哪一個是命令,並找出命令對應的可執行程序文件,提請給內核啓動爲一個進程;

 

                                    命令有兩類:

                                                內建命令:shell程序自帶的命令;

                                                外部命令:每一個命令都有一個與之對應的,且名字同命令的可執行程序文件;

 

                                                            type命令:來斷定給定的命令是內部命令,仍是外部命令;

                                                            查看外部命令對應的可執行文件的位置:

                                                                        which

                                                                        whereis

 

                        運行命令:

                                    命令格式:

                                                COMMAND[OPTION]... [ARGS]...

                                                            選項:用戶啓用或關閉命令的某個或某些功能;

                                                                        短選項:-CHARACTER

                                                                                    -l,-h

                                                                                Note:多個短選項若是不合並,則彼此間要有空白字符分隔;可合併,合併時使用一個-引導,例如-lh;有些短選項本身也須要帶參數,這叫選項參數;

                                                                        長選項:--word

                                                                                    --human-readable,--help

                                                            參數:命令的做用對象;

                                                                        向命令提供數據;

 

            文件系統:

                        數據有兩類:

                                    元數據:metadata

                                    數據:data

 

                        文件命名規範:

                                    1、嚴格區分字符大小寫;

                                                niulang,Niulang

                                    2、文件名可以使用除/之外的任意字符;不建議使用特殊字符;

                                    3、文件名最長不能超過255個字符;

                                    4、全部以.開頭的文件均爲隱藏文件;

 

                        根文件系統:

                                    rootfs: rootfilesystem

 

                                    絕對路徑:從根開始的路徑;

                                    相對路徑:從當前位置開始路徑;

                                                當前目錄:currenctdirectory, working directory

                                                主目錄:家目錄,HOME

 

                                    /etc/rc.d/rc.sysint

                                                /etc/rc.d/rc.sysinit

                                                /etc

                                                            rc.d/rc.sysint

                                                            ./rc.d/rc.sysint

 

                                                ..:父目錄

 

                        LSB: Linux Standard BaseCore Specification

                                    FHS: 文件層級標準

 

                        pwd命令:顯示當前目錄

相關文章
相關標籤/搜索