View the system version information:
$ cat /etc/os-release
For example, the command and output are as follows:
$ cat /etc/os-release
PRETTY_NAME="Deepin 20.6"
NAME="Deepin"
VERSION_ID="20.6"
VERSION="20.6"
VERSION_CODENAME="apricot"
ID=Deepin
HOME_URL="https://www.deepin.org/"
BUG_REPORT_URL="https://bbs.deepin.org/"
View the CPU information:
$ lscpu
View the memory information:
$ free -h
View the disk information:
$ sudo fdisk -l
View the real-time system resource information.
$ top
View the kernel version infornation:
$ uname -r
View current username:
$ whoami
How to change current user password ?
$ passwd
View the ip address:
$ ifconfig
View the system local and Keyboard Layout status:
$ localectl status
System Locale: LANG=zh_CN.UTF-8
LANGUAGE=zh_CN
VC Keymap: n/a
X11 Layout: cn
X11 Model: pc105
View the system date、time and timezone status:
$ timedatectl status
Local time: 三 2022-07-06 17:25:24 CST
Universal time: 三 2022-07-06 09:25:24 UTC
RTC time: 三 2022-07-06 17:25:24
Time zone: Asia/Beijing (CST, +0800)
System clock synchronized: yes
NTP service: active
RTC in local TZ: yes
View the hostname:
$ hostname
How to restart the system?
$ reboot
How to shut down the system ?
$ poweroff
How to login the system as root ?
$ sudo -i
[sudo] password for Current_User:
Verification successful
root@Hostname:~#
How to upgrade the system ?
$ sudo apt update && sudo apt dist-upgrade