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

The Linux process runs in the background

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

Share

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

The first way:

After the running command, + &, but in this way, if the parent process is killed, the process will also die.

The second way:

# yum install screen-y

Common screen parameters:

# screen-S docker-d create a new session called docker-d, and immediately enter # screen-dmS docker-d to create a new session called docker-d, but do not enter it for the time being. It can be used in the system startup script # screen-ls to list all current session# screen-r docker-d restore to zhouxiao session. The premise is that it is already disconnected (- d can disconnect the session remotely) # screen-x docker-d connects to the offline mode session (multi-window synchronous demonstration) # screen. / rsync.sh screen creates a single-window session that executes scripts, and the attach process ID# screen-wipe can check all current screen jobs and delete screen jobs that are no longer available

Normally, when you exit the last program in a window (usually bash), the window closes. Another way to close a window is to use Cmura k, a shortcut that kills the current window as well as running processes in that window.

Under each screen session, all commands start with ctrl+a (Cmura).

Cmura w displays a list of all windows Cmura k this shortcut key kills the current window, but also kills the running processes in that window. Cmura d detach, temporarily leave the current session

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