基本指令 uname
更新記錄
item | note |
---|---|
20150626 | 第一版 |
目錄
基本指令
顯示kernel版本
指令: uname -r
檔案: /proc/cmdline (load kernel information)
檔案: /proc/version
man uname
1 | uname - print system information |
example
1 | xx$ uname -a |
顯示os版本
指令: lsb_release
檔案: /etc/lsb-release
檔案: /etc/os-release
man lsb_release1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16lsb_release - print distribution-specific information
-v, --version
Show the version of the LSB against which your current installation is compliant. The version is expressed as a colon sepa‐
rated list of LSB module descriptions.
-i, --id
Display the distributor's ID.
-d, --description
Display a description of the currently installed distribution.
-r, --release
Display the release number of the currently installed distribution.
-c, --codename
Display the code name of the currently installed distribution.
-a, --all
Display all of the above information.
-s, --short
Use the short output format for any information displayed. This format omits the leading header(s).
example
1 | xx$ lsb_release -a |
取得使用者名稱
1 | xx$ id -un |