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 Shortcut

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

Share

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

This article mainly explains "how to use Linux shortcuts". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use Linux shortcuts.

The command runs using CTRL+Z to force the current process to background and stop it.

1. Bring the process back to work (background)

(1) use the command bg

Example:

Zuii@zuii-desktop:~/unp/tcpcliserv$. / tcpserv01

* CTRL+Z is used here, and serv01 is stopped *

[1] + Stopped. / tcpserv01

Zuii@zuii-desktop:~/unp/tcpcliserv$ bg

[1] +. / tcpserv01 & * serv01 is running in the background *

Zuii@zuii-desktop:~/unp/tcpcliserv$

(2) what if several programs are stopped with CTRL+Z?

Example:

Zuii@zuii-desktop:~/unp/tcpcliserv$ jobs

[1]-Running. / tcpserv01 &

[2] + Stopped. / tcpcli01 127.0.0.1

Zuii@zuii-desktop:~/unp/tcpcliserv$ bg 1

Bash: bg: task 1 has been transferred to the background * running in the background *

two。 Restore the process to the foreground

Example:

Zuii@zuii-desktop:~/unp/tcpcliserv$. / tcpserv04

[1] + Stopped. / tcpserv04

Zuii@zuii-desktop:~/unp/tcpcliserv$ fg

. / tcpserv04

Summary:

(1) CTRL+Z stops the process and puts it into the background

(2) jobs shows the currently paused process

(3) bg% N makes the Nth task run in the background (with a space before%)

(4) fg% N makes the Nth task run in the foreground

Default bg,fg without% N means operation on the last process!

At this point, I believe you have a deeper understanding of "the use of Linux shortcuts". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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