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 most common basic commands of Linux

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

Share

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

This article shares with you what are the most common basic commands in Linux. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

1.ls

Whether you are from the root directory or from a folder. Ls can list all the files in this folder.

2.cd

Cd is also often used in window; it is used to switch between directories. When the length of the entered file name reaches a unique identification, pressing the tab key will automatically add the full file name

3.mv

This is the abbreviation of move, as the name implies, it is to move a file or folder from one directory to another.

The syntax format is

Directory where mv is located. The directory you want to move.

4. There are also some shortcut keys. It is slightly different from window.

CTRL+K cuts the text from the cursor until the end of the line

CTRL+Y paste text

CTRL+E moves the cursor to the end of the line

CTRL+A moves the cursor to the beginning of the line

ALT+F jumps to the next space

ALT+B returns to the previous space

ALT+Backspace deletes the previous word

CTRL+W cut the word before the cursor

Shift+Insert pastes the text into the terminal

Ctrl+D logout

5.mkdir

Create a folder. You can create it in the root directory, or you can cd it to a place where you want to put the file.

6.at

Run your program at a specific time

7.rmdir

Delete a directory, used only to delete empty directories

8.rm

If you want to delete files, the rm command is what you want. It can delete files and directories. To delete a file, type rm testfile, or delete a directory and the files in it, type rm-r.

9.touch

Similar to mkdir, a new directory is created

10.locate

This command is the command you use to find files in the Linux system.

11.ps

Not the photoshop that we usually use, but to view all the current processes

12.jobs

View the tasks currently running in the background of the terminal

13.kill

(1) View jobnum through the jobs command, and then execute kill% jobnum

(2) check the process number PID through the ps command, and then execute kill% PID

If it is a foreground process, you can terminate it by executing Ctrl+c directly.

14. Switching between foreground and background processes

(1) fg

Function: transfer the commands in the background to the foreground to continue to run

If you have more than one command in the background, you can first view the jobnum with jobs, and then call up the selected command with fg% jobnum.

(2) crtl + z

Function: put a command being executed in the foreground in the background and be in a paused state

(3) bg command

Function: change a command that is paused in the background to continue execution in the background

If you have more than one command in the background, you can first view the jobnum with jobs, and then call up the selected command with bg% jobnum to continue execution

Thank you for reading! On the most common basic commands of Linux which are shared here, I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

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