Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the commands that linux must learn?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you what linux must learn commands, I hope you will learn a lot after reading this article, let's discuss it together!

The common commands of Linux are

System information

Processor Architecture of arch display Machine (1)

Processor Architecture of uname-m display Machine (2)

Uname-r shows the kernel version in use

Dmidecode-Q display hardware system components-(SMBIOS / DMI)

Hdparm-I / dev/hda lists the architectural features of a disk

Hdparm-tT / dev/sda performs testable read operations on disk

Cat / proc/cpuinfo displays the information of CPU info

Cat / proc/interrupts display interrupt

Cat / proc/meminfo verifies memory usage

Cat / proc/swaps shows which swap is used

Cat / proc/version shows the kernel version

Cat / proc/net/dev display Network Adapter and Statistics

Cat / proc/mounts displays the loaded file system

Lspci-tv lists PCI devices

Lsusb-tv display USB device

Date displays the system date

Cal 2007 displays the calendar for 2007

Date 041217002007.00 sets the date and time-month, day, hour, year. Second

Clock-w saves time changes 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 & shuts down the system at the scheduled time

Shutdown-c cancels shutting down the system at the scheduled time

Shutdown-r now restart (1)

Reboot restart (2)

Logout logout

Files and directories

Cd / home enter the'/ home' directory'

Cd.. Return to the previous directory

Cd.. /.. Return to the upper two-level directory

Cd enters the personal home directory

Cd ~ user1 enters the personal home directory

Cd-returns the directory where it was last located

Pwd displays the work path

Ls view the files in the directory

Ls-F View the files in the directory

Ls-l displays the details of files and directories

Ls-a shows hidden files

Ls * [0-9] * displays file and directory names that contain numbers

Tree displays the tree structure of files and directories starting from the root directory (1)

Lstree displays the tree structure of files and directories starting from the root directory (2)

Mkdir dir1 creates a directory called 'dir1''

Mkdir dir1 dir2 creates two directories at the same time

Mkdir-p / tmp/dir1/dir2 create a directory tree

Rm-f file1 deletes a file called 'file1''

Rmdir dir1 deletes a directory called 'dir1''

Rm-rf dir1 deletes a directory called 'dir1' and deletes its contents at the same time

Rm-rf dir1 dir2 deletes both directories and their contents

Mv dir1 new_dir rename / move a directory

Cp file1 file2 copies 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

Ln-s file1 lnk1 creates a soft link to a file or directory

Ln file1 lnk1 creates a physical link to a file or directory

Touch-t 0712250000 file1 modifies the timestamp of a file or directory-(YYMMDDhhmm)

File file1 outputs the mime type of the file as text

Iconv-l lists known codes

After reading this article, I believe you have a certain understanding of the commands that must be learned in linux. You want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report