System information
arch displays the processor architecture of the machine
uname -m displays the processor architecture of the machine
uname -r displays the kernel version in use
dmidecode -q displays the hardware system components-(SMBIOS / DMI)
hdparm -i /dev/hda lists a disk The architecture features
hdparm -tT /dev/sda perform a test read operation on the disk
cat /proc/cpuinfo display CPU info information
cat /proc/interrupts display interrupt
cat /proc/meminfo check memory usage
cat /proc/swaps Show which swap is used
cat /proc/version Show kernel version
cat /proc/net/dev Show network adapters and statistics
cat /proc/mounts Show loaded file system
lspci -tv List PCI devices
lsusb -tv Show USB device
date Display system date
cal 2007 Display 2007 calendar
date 041217002007.00 Set date and time-month, day, hour, minute, year. Second
clock -w Save time modification to BIOS
shutdown (system shutdown, restart and logout)
shutdown -h now shutdown system
init 0 shut down the system
telinit 0 shut down the system
shutdown -h hours:minutes & shut down the system at the scheduled time
shutdown -c cancel shut down the system at the scheduled time
shutdown -r now restart
reboot restart
logout logout
files and directories
cd /home enter the'/home' directory '
cd .. return to the upper level directory
cd ../.. return to the upper two level directories
cd enter the personal home directory
cd ~user1 enter the personal home directory
cd-return to the last directory
pwd display the working path
ls view the directory file
ls -F view files in a directory
ls -l show details of files and directories
ls -a show hidden files
ls * [0-9] * display contains a number of file and directory names
tree display files and directories from the root directory The starting tree structure
lstree displays the tree structure of files and directories starting from the root directory
mkdir dir1 creates a directory called'dir1 '
mkdir dir1 dir2 creates two directories at the same time
mkdir -p /tmp/dir1/dir2 creates a directory tree
rm -f file1 delete a file called'file1'
rmdir dir1 delete a directory
called'dir1 ' rm -rf dir1 delete a directory called'dir1' and delete its contents at the same time
rm -rf dir1 dir2 delete two directories and their contents at the same time
mv dir1 new_dir rename/move one Directory
cp file1 file2 Copy a file
cp dir/*. Copy all files in a directory to the current working directory
cp -a /tmp/dir1. Copy a directory to the current working directory
cp -a dir1 dir2 Copy a directory
Linux commonly used commands (specially complete)
Guess you like
Origin blog.csdn.net/weixin_43283397/article/details/109379313
Recommended
Ranking