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 operation commands of Linux?

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article shows you what the operation commands of Linux are, which are concise and easy to understand, which can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

The operation command basis of three Linux

1. Basic instructions for system operation

1) what is the system command prompt: prompts management system users when they can enter commands

[root@ccl007 ~] #

① ② ③

Composition description:

① logs in to the system user name at this time

② sets host name information

③ displays the path information

"~" means in the user's home directory

2) Command syntax description

Syntax specification: command spaces [parameters / demand conditions] space object information (file / directory)

Mikdir-p / ccl/ccl2

3) system directory structure: / ccl/ccl.txt

Absolute path lookup data: find data information from the root

Relative path lookup data: find data information from the current path

two。 System operation management command

Shutdown-shut down the operating system command

Method 1: enter the command directly to shut down the system

Shutdown-shutdown in 1 minute

Method 2: specify how long it takes to shut down the system

Shutdown-h 5 (shut down in five minutes)

Method 3: shut down the operating system immediately

Shutdown-h 0/now

Shutdown restart system +-r

Shutdown-r (reboot) 5 (restart in five minutes)

Shutdown-r (reboot) 0/now (restart now)

Shutdown-c-cancel shutdown plan / cancel restart plan

3. System directory related commands

1) create directory information

Mkdir create directory command

When the mkdir-v directory is created, there is a prompt to show

Mkdir-p create a multi-level directory

2) how to view the catalog

Ls to view file or directory information

Ls / ccl-View the data information in the directory

Ls-d / ccl directly confirms whether the directory exists

Ls-l / ccl/-View catalog details

3) how to use the switch directory

Cd / ccl/ccl1/ccl2/ccl3 uses absolute path to switch directories

Using relative path for directory switching

Cd.. / switch to one or more levels of directory

Cd / ccl2/ccl3 switch to the next level directory

Cd ~ or cd switch home directory

Cd-quickly switch to the last directory

4) View the path information of the current directory pwd

5) how to delete a directory

Force recursive deletion of directories: rm-rf

Force deletion of file data: rm-f

Force delete / all data under: rm-rf /

Force deletion of files starting with ccl: rm-f / ccl/ccl1

Delete information ending in .jpg: rm-f / ccl/*.jpg

4. System file related commands

Touch creates an empty file

Cat View Files

Vi Editing Fil

Echo > clear the contents of the file before adding new information

Echo > > append new information to the original file

Cp copy command syntax structure: cp [parameter] to copy the source file backup file directory path

Mv truncation command syntax format: mv [parameter] to which directory to move the source file

5. Get help command

1) man+ command

Man (manual)-get help information such as commands / parameters

2) use help+ built-in commands (such as help cd) and external commands + help (such as ls help)

Command-- help/-help/-h/--h-get command parameter help information

The above are the operation commands of Linux. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

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