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

Three months of study summary, basic knowledge of Linux

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

Share

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

So far, I have been studying for three months. These three months are mainly about the basic knowledge of Red Hat Linux system. Sum up my learning situation.

Linux Learning content:

(1)。 Install the Linux system

(2)。 Basic command

Everything in the Linux system is a file

Initialization process

Systemctl restart service name restart service (PID value will change)

Systemctl reload service name restart service (pid value unchanged)

Systemctl start service name start service

Systemctl stop service name stop service

Add the Systemctl enable service name to the startup item

Systemctl status service name view service status

Systemd service name systemctl configuration tool name

Command suffix form:-letter example:-a-l-- word example:-- all-- list

Horizontal bars can be merged-al

Common system working commands

Echo command

The echo command is used to output the value of a string or variable from the terminal in the format of "echo [string | $variable].

Data command

The data command is used to display and set the time or date of the system in the format "data [options] [+ specified format]".

Reboot command

The reboot command is used to restart the system in the format reboot.

Poweroff command

The poweroff command is used to shut down the system in the format poweroff.

Wget command

The wget command is used to download network files in the terminal in the format of "wget [parameter] download address".

Ps command

The ps command is used to view the status of processes on the system in the format "ps [parameters]"

Pidof command

The pidof command is used to query the pid value of a specified service process in the format "pidof [parameter] [service name]".

Kill command

The Kill command is used to terminate a service process with a specified PID in the format "Kill [parameters] [process PID]".

Killall command

The killall command is used to terminate all processes corresponding to a server with a specified name in the format "killall [parameter] [service name]".

System status detection command

Ifconfig

The ifconfig command is used to obtain information such as network card configuration and network status in the format of "ifconfig [network equipment] [parameters]".

Uname command

The Uname command is used to view information such as the kernel and version of the system in the format "uname [- a]".

Uptime command

Uptime is used to view the load information of the system in the format uptime.

Free command

Free is used to display memory usage information on the current system in the format "free [- h]".

5.who command

Who is used to view the user terminal information of the currently logged-in host in the format of "who [parameters]".

6.last command

The last command is used to view login records for all systems in the format "last [parameters]".

7.history command

The history command is used to display historically executed commands in the format "history [- c]".

8.sosreport command

The sosreport command is used to collect system configuration and architecture information and output diagnostic documents in sosreport format.

Working directory switch command

1.pwd command

The pwd command is used to display the working directory where the user is currently located, in the format "pwd [options]"

2.cd command

The cd command is used to switch the work path in the format "cd [directory name]".

3.ls command

The ls command is used to display file information in the directory in the format "ls [options] [File]".

IV. Text file editing command

1.cat command

The cat command is used to view plain text files (those with less content) in the format "cat [options] [files]".

2.more command

The more command is used to view plain text files (those with more content) in the format "more [options] file".

3.head command

The head command is used to view the first N lines of a plain text document in the format "head [options] [File]".

4.tail command

The tail command is used to view the last N lines of a plain text document or to continuously refresh the contents in the format "tail [options] [File]".

5.tr command

The tr command is used to replace characters in a text file in the format "tr [original character] [target character]".

6.wc command

The wc command is used to count the number of lines, words, and bytes of the specified text in the format "wc [parameter] text".

7.stat command

The stat command is used to view the specific storage information, time and other information of the file in the format of "stat file name".

8.cut command

The cut command is used to extract text characters by column, formatted as cut [parameter] text.

9.diff command

The diff command is used to compare the differences of multiple text files in the format "diff [parameters] file".

Five. file directory management command

1.touch command

The touch command is used to create a blank file or to set the time of the file in the format "touch [options] [File]".

2.mkdir command

The mkdir command is used to create a blank directory in the format "mkdir [options] directory".

3.cp command

The cp command is used to copy a file or directory in the format "cp [options] source file destination file"

Mv command

The mv command is used to cut or rename a file in the format "mv [option] source file [destination path | destination file name]".

6.rm command

The rm command is used to delete a file or directory in the format rm [options] file.

7.dd command

The dd command is used to copy or convert files in the format of "dd [parameters]" according to the specified size and number of data blocks.

8.file command

The file command is used to view the type of file in the format "file file name".

VI. Package compression and search commands

1.tar command

The tar command is used to package, compress or extract files in the format "tar [options] [files]".

2.grep command

The grep command is used to perform a keyword search in text and display matching results in the format "grep [options] [File]".

3.find command

The find command is used to find files according to the specified criteria in the format "find [lookup path] find conditional action".

(3)。 Pipe symbols, redirects, and environment variables

Redirector [command] [file]

Clear: > command > file 2 command > file: output error message

Output redirector:

< 追加: >

> commands > > Files ~ ~ & commands > > Files: all information is output

Entry and exit redirector:

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