In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what is the use of Screen in linux. It is very detailed and has a certain reference value. Interested friends must finish reading it!
What is the screen command?
Screen is a full-screen window manager that can multiplex a physical terminal between multiple processes. There is the concept of session in Screen, where users can create multiple screen windows in a screen session, each screen window as if it were a real telnet/SSH connection window.
How to install the screen command?
Except for some simplified systems or customized systems, most of the screen commands are installed. If not, the CentOS system can execute: yum install screen
Debian/Ubuntu system execution: apt-get install screen.
3. How to use screen command?
1. Common methods of use
Used to solve the problems we encountered at the beginning of the article, such as when installing lnmp.
1.1 create a screen session
You can first execute: screen-S lnmp, and screen will create a session named lnmp.
1.2 leave temporarily and keep the tasks or programs in the screen session
When you need to leave temporarily (the program in the session will not close and is still running), you can use the shortcut key Ctrl+a d (that is, press and hold Ctrl, then press ameme d)
1.3 resuming a screen session
You can execute again when you come back: screen-r lnmp will revert to the working interface of the lnmp session you created before you left. If you forget, or if no session name is specified at that time, you can execute: screen-ls screen will list the currently existing sessions, as shown below:
11791.lnmp is the lnmp session created by the screen just now. Currently, the lnmp session has been temporarily exited, so the state is Detached. When you use screen-r lnmp, the state will change to the process ID of the session in which Attached,11791 is the screen. You can also use screen-r 11791 to resume the session.
1.4 close the session of screen
Execute: exit, will prompt: [screen is terminating], indicating that you have successfully exited the screen session. VPS Detective http://www.vpser.net/
2. Remote demonstration
First, the presenter executes screen-S test on the server to create a screen session, and the viewer can link to the remote server to execute screen-x test. The viewer will synchronize with the presenter on the viewer's screen.
3. Common shortcut keys
Ctrl+a c: create a window in the current screen session
Ctrl+a w: window list
Ctrl+a n: next window
Ctrl+a p: previous window
Ctrl+a 0-9: switch between window 0 and window 9
Please run screen before installing lnmp
Although Detective vps has published the use of the screen command before, and has given a simple explanation with the lnmp installation package, some rookies will ask when installing lnmp through putty or SecureCRT, the network is suddenly disconnected or putty is accidentally turned off, and other reasons, causing the lnmp installation process to be interrupted. In fact, it is very simple to prevent this phenomenon, as long as you execute the screen command before installing lnmp.
Licess also talked about the use of the screen command on Detective vps. Let's talk about it again in conjunction with the installation process of lnmp.
1. Forget about the installation method of screen. Read the article on Detective vps.
2. Execute: screen-S lnmp creates a screen session.
2. Execute: wget-c http://soft.vpser.net/lnmp/lnmp0.5-full.tar.gz downloads the installation package.
3. Execute: decompress tar zxvf lnmp0.5-full.tar.gz.
4. Execute: cd lnmp0.5-full/ enters the lnmp0.5 directory.
5. Centos executes:. / centos.sh, Debian executes:. / debian.sh to install.
If the network is offline, you can reconnect, and then execute screen-r lnmp to see your lnmp installation process.
The above is all the content of this article "what is the use of Screen in linux?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.