1. 程式人生 > 其它 >系統中重要的檔案系統

系統中重要的檔案系統

系統中重要的檔案系統

解析對映檔案

1.系統中重要的檔案系統
2.使用單使用者模式修改root密碼
    1.加鹽

  

磁碟掛載檔案

/etc/fstab
磁碟掛載檔案

  

開機載入指令碼

/etc/rc.local

1.編輯開機自啟動指令碼
    vim /etc/rc.local
2.設定開機自啟動許可權
    chmod +x /etc/rc.d/rc.local
3.重啟系統

  

系統啟動級別

系統級別:
    init [編號]     臨時設定
    systemctl set-default[系統啟動級別]

通過單使用者模式修改密碼
    1.重啟
    2.在啟動選擇系統核心介面,按e鍵進入單使用者模式
    3.找到linux16 開頭行,刪除ro,並且在ro處新增 rm init=/sysroot/bin/sh
    4.按 ctrl + x進行系統重新引導
    5.執行 chroot /sysroot
    6.執行 passwd root
    7.執行touch /.autorelabel
    8.執行 Ctrl + D 啟動

  

變數載入檔案

在Linux中新增環境變數怎麼新增呢?

檔案
    /etc/profile
    /etc/bashrc
    ~/.bash_profile
    ~/.bash_rc

資料夾
    /etc/profile.d/
  
增加環境變數的格式
    exprot PYTHON_HOME='D:/PYTHON'

檢視本機的環境變數
    echo $PYTHON_HOME   :檢視某一個環境變數
    printenv                       :檢視所有環境變數

讀取環境變數的幾種情況,並且測試處使用檔案的使用順序
    1.重啟
        /etc/profile.d --> /etc/profile --> /etc/bashrc --> ~/.bash_rc --> ~/.bash_profile
    2.切換使用者
        etc/profile.d --> /etc/bashrc --> ~/.bashrc
            知識儲備:
                    useradd [使用者名稱]
                    su[使用者名稱]
    3.重啟登入使用者名稱
        1.su - [使用者名稱]
            //etc/profile.d --> /etc/profile --> /etc/bashrc --> ~/.bashrc --> ~/.bash_profile
			
		2、ssh [email protected]
			/etc/profile.d --> /etc/profile --> /etc/bashrc --> ~/.bashrc --> ~/.bash_profile

  

登入提示檔案

登入成功之後顯示的資訊
/etc/motd

登入之前顯示的資訊
/etc/issue

  

編譯安裝目錄

# 安裝第三方軟體的目錄
/user/local

下載rpm安裝包
yum安裝prthon:yum install python3

  

系統日誌目錄

/var

  

保持系統執行狀態的目錄

保持CPU執行狀態的: /proc/cpuinfo
    lscpu
保持記憶體的狀態的:/proc/meminfo
    free
保持系統負載的:/proc/loadavg
    w
    0.00           :     1分鐘內的CPU負載
    0.01           :    5分鐘內的CPU負載
    0.05           :    15分鐘內的CPU負載

    負載:當前系統的所有程序佔用CPU的時間比


保持系統掛載資訊: /proc/mounts
    mount
    umount