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

How to use Linux keyboard more efficiently

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

Share

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

This article mainly introduces "how to use Linux keyboard more efficiently". In daily operation, I believe many people have doubts about how to use Linux keyboard more efficiently. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to use Linux keyboard more efficiently". Next, please follow the editor to study!

[Tab] is used to automatically complete a command and path or file name

[root@localhost ~] # user after entering user, press the [Tab] key on the keyboard twice to list commands that start with user

[root@localhost ~] # usera press the [Tab] key on the keyboard after entering usera, and you can automatically complete the command useradd command that begins with usera

[root@localhost ~] # useradd after entering useradd, press the [Tab] key on the keyboard twice to list all files and directories in the current directory

~ this symbol represents the user's own home directory

[root@localhost ~] # cd /

[root@localhost ~] # pwd

[root@localhost] # cd ~

[root@localhost ~] # pwd

! Add this symbol before a command to call the last command [root@localhost ~] # find / root/install.log that starts with this command in the command history

[root@localhost ~] # file / root/install.log

[root@localhost ~] #! F in a single command will call the command file / root/install to find the file

[root@localhost ~] #! fi in one command will call file / root/install, the command to find the file

[root@localhost ~] #! fin in one command will call find / root/install, the command to find the file

$is used to reference a variable

[root@localhost ~] # myhost=www.liuziyang.cn

[root@localhost ~] # echo $myhost

& at the end of a command means that the task is run in the background

% is used to represent a task (task is not a process) number

[root@localhost] # while true; do echo hello > > / dev/tty2; sleep 1; done&

[root@localhost] # while true; do echo www.liuziyang.cn > > / dev/tty2; sleep 1; done&

[root@localhost] # [ctrl] + [alt] + [F2] here means to switch to the second console / dev/tty2 and view the output

Switch between [ctrl] + [alt] + [F1] and [F2] after each of the following commands to see a change in the result

[root@localhost ~] # jobs

[root@localhost ~] # fg 1

[root@localhost] # [ctrl] + z press the combination of [ctrl] and z on the keyboard here

[root@localhost ~] # jobs [root@localhost ~] # kill% 2

[root@localhost ~] # jobs

[root@localhost ~] # bg 1

[root@localhost ~] # jobs

[root@localhost ~] # kill% 1 ``indicates a command or script''represents a string "" represents a string

Pay attention to the output of each command

[root@localhost ~] # echo `hostname`

[root@localhost ~] # echo 'hostname'

[root@localhost ~] # echo "hostname" | Pipe symbol, used to filter after a command statement

[root@localhost ~] # ls-l / etc | more

[root@localhost ~] # cat / etc/passwd | awk-F:'{print $7}'| sort | uniq

^ matches the beginning of the string

Match the end of the string

Directional symbols

< 定向符号 >

Append symbols

Note the comparison of the output results of each command

[root@localhost ~] # grep ^ root

< /etc/passwd >

Result1.txt

[root@localhost ~] # cat result1.txt

[root@localhost ~] # grep bash$

< /etc/passwd >

Result1.txt

[root@localhost ~] # grep bash$

< /etc/passwd >

Result2.txt

[root@localhost ~] # cat result1.txt

[root@localhost ~] # cat result2.txt

[root@localhost ~] # grep root

< /etc/passwd >

> result2.txt

[root@localhost ~] # cat result2.txt

At this point, the study on "how to use the Linux keyboard more efficiently" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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