System related to Linux commands

 

Get system information

 

arch        shows the processor architecture of the machine

 

uname -m   displays the processor architecture of the machine

 

uname -r     shows the kernel version in use 

 

dmidecode -q show hardware system parts - (SMBIOS/DMI)

 

hdparm -i /dev/hda lists the architectural characteristics of a disk

 

hdparm -tT /dev/sda performs a test read operation on the disk

 

cat /proc/cpuinfo displays information about CPU info

 

cat /proc/interrupts shows interrupts

 

 cat /proc/meminfo check memory usage

 

cat /proc/swaps shows which swaps are used

 

cat /proc/version shows the version of the kernel

 

cat /proc/net/dev shows network adapters and statistics

 

cat /proc/mounts shows mounted filesystems

 

lspci -tv lists PCI devices

 

lsusb -tv shows usb devices

 

date displays the system date

 

cal 2007 displays the calendar for 2007

 

date 041217002007.00 set date and time - month day hour minute year . second

 

clock -w saves time modification to BIOS

 

 Shutdown ( shutdown, restart, and logout of the system )

 

shutdown -h now shuts down the system (1)

 

init 0 shuts down the system (2)

 

telinit 0 shuts down the system (3)

 

shutdown -h hours:minutes & Shut down the system at the scheduled time

 

shutdown -c cancels the shutdown of the system at the scheduled time

 

shutdown -r now restart (1)

 

reboot reboot (2)

 

logoutlogout _

 

disk space

 

df -h displays a list of mounted partitions

 

ls -lSr |more Arrange files and directories by size

 

du -sh dir1 估算目录 'dir1' 已经使用的磁盘空间'

 

du -sk * | sort -rn 以容量大小为依据依次显示文件和目录的大小

 

rpm -q -a --qf '%10{SIZE}t%{NAME}n' | sort -k1,1n 以大小为依据依次显示已安装的rpm包所使用的空间 (fedora, redhat类系统)

dpkg-query -W -f='${Installed-Size;10}t${Package}n' | sort -k1,1n 以大小为依据显示已安装的deb包所使用的空间 (ubuntu, debian类系统)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326079584&siteId=291194637