In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 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 the screen command in Centos system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to use the screen command in the Centos system".
Screen is a good thing. I've been using it these days. Screen is called a full-screen window manager, which can easily achieve the effect of multiple virtual terminals on a physical terminal.
If you encounter some more time-consuming programs, but can not always open the computer to observe him, always have to turn off the computer after work and go, then screen will come in handy.
1. If you open a window in screenCRT and run a program, the program will be destroyed automatically when you log out.
two。 Using nohup can solve this problem, put the program in the background, check nohup.out to see how the program is running, but using nohup to put the program in the background, you can no longer switch programs to the foreground, and screen can.
How to use it:
1. Install, centos is not installed by default, install it.
two。 Enter screen.
Enter screen directly and enter, and a new terminal will be entered at this time. You can do jobs that run for a long time.
3. Return to the primary terminal (screen is still running in the background)
Ctrl+A then press the D screen to display [detached]
4. Return to screen
Screen-ls
There is a screen on:
18245.pts-1.imobile-sv006-200 (Detached)
1 Socket in / var/run/screen/S-root.
You can see all the screen socket, which can be returned using screen-r 18245.
5. Completely exit the screenscreen terminal and enter exit. Just display [screen is terminating] on the screen
6. Screen sharing, collaborative work
One of the users, screen-S ipcpu, uses a named socket for easy input.
Another user, screen-x ipcpu, can work together, and the actions of one side will be displayed on the other screen.
Other commands of screen
Ctrl-a? Summary of help for each featur
Ctrl-a c create a new window (terminal)
Ctrl-a Ctrl-n and Ctrl-a Ctrl-p switch to the next or previous window
Ctrl-a Ctrl-N N is a number from 0 to 9, used to switch to the corresponding window
Ctrl-a "gets a navigable list of all running window
Ctrl-an a knows the wrong Ctrl-a
Ctrl-a Ctrl-d disconnects all sessions, and all tasks in the session run in the background
Password locking column screen terminal for Ctrl-a x
= =
Postscript
In the process of using screen, we often encounter the problem of "splash screen", which can be turned off.
Turn it off quickly: that is, type CTRL + an and then CTRL + g.
Permanent shutdown: modify / etc/screenrc join
Vbell off
In fact, this is very similar to the visualbell function in vi. To turn off the splash screen in vi, use the set novisualbell command.
At this point, I believe you have a deeper understanding of "the use of screen commands in the Centos system". 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.
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.