In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what are the skills for the use of GNU Screen". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
GNU Screen is a full-screen window manager that reuses physical terminals between multiple processes (usually interactive shell). Programs running in Screen continue to run when the screen is currently invisible, even when the entire screen session is separated from the user terminal.
Learn basic GNU Screen terminal multiplexing techniques, and then download our terminal command memo so that you can familiarize yourself with common shortcuts.
For the average user, the command line terminal window can be confusing and mysterious. But as you learn more about Linux terminals, you will soon realize how efficient and powerful it is. However, it won't take long before you want to make the terminal more efficient. Besides putting more terminals on your terminal, is there any good way to improve your terminal efficiency?
Terminal reuse
One of the many advantages of terminal is that it is a centrally controlled interface. It is a window that allows you to access hundreds of applications, and all you need to interact with each application is a keyboard. However, modern computers almost always have extra processing power, and modern computer experts like multitasking, so the ability of a window to handle hundreds of applications is quite limited.
The common answer to this problem is terminal reuse: the ability to stack virtual terminals on top of each other and move between them. Through the terminal multiplexer, you maintain centralized control, but when you multitask, you can switch terminals. Even better, you can split the screen in the terminal so that multiple screen windows are displayed at the same time.
Select the appropriate multiplexer
Some terminals provide similar functions, with tabbed interfaces and split views, but with subtle differences. First, the function of these terminals depends on the graphical desktop environment. Secondly, many graphical terminal functions require mouse interaction or the use of inconvenient keyboard shortcuts. The function of the terminal multiplexer is as easy to use on the text console as on the graphical desktop, and the key binding is designed for common terminal sequences, which is very convenient.
There are two popular multiplexers: tmux? And GNU Screen. Although you interact with them in slightly different ways, they do the same thing, and most of them have the same function. This article is a guide to getting started with GNU Screen. For an introduction to tmux, please read Kevin Sonney's introduction to tmux.
Use GNU Screen
The basic usage of GNU Screen is very simple, through? screen? The command starts, and you will enter the 0th window of the Screen session. It may be difficult to notice any changes before you decide that you need a new terminal prompt.
When a terminal window is occupied by an activity (for example, you start a text editor Vim or Jove, or you are working on audio and video, or running batch tasks), you can create a new window. To open a new window, press Ctrl+A, release, and then press c. This will create a new window based on your existing window.
You will know that you are currently in a new window because your terminal seems to have nothing but the default prompt. Of course, your other terminal still exists, it's just hiding behind the new window. To traverse the open window, press Ctrl+A, release, and then press n (for next) or p (for previous). With only two windows open, n and p have the same function, but you can open more windows (Ctrl+A, then c) at any time and switch between them.
Split screen
The default behavior of GNU Screen is more like a mobile device's screen than a desktop: you can only see one window at a time. If you use GNU Screen because you like multitasking, focusing on only one window may seem like a step backwards. Fortunately, GNU Screen allows you to divide the terminal into windows.
To create a split horizon window, press Ctrl+A, then press s. This places one window on top of another, just like a pane. However, the divided space is useless until you tell it what to display. So, after creating a split window, you can use Ctrl+A, and then use Tab to move to the split window. Once inside, use Ctrl+An and then n browse all available windows until what you want to display appears in the split pane.
You can also press Ctrl+An and then press | (this is a pipe character, on most keyboards by pressing the shift key plus\) to create a vertical split window.
Custom GNU Screen
GNU Screen uses Ctrl+A-based shortcut keys. Depending on your habits, this may feel very natural or inconvenient, because you may use Ctrl+A to move to the beginning of a line. In any case, GNU Screen allows various customizations through the .screenrc configuration file. You can use this to change the binding of the trigger key (called "escape" key binding).
Escape ^ jJ
You can also add a status line to help you keep yourself from getting lost in a Screen session.
# status bar, with current window highlightedhardstatus alwayslastlinehardstatus string'% {= kG} [% {G}% H%?% 1`%?% {g}] [% =% {= kw}%-w% {+ b yk}% n% t%? (% u)%?% {-}% + w% =% {g}] [% {B}% mplink% d% {W}% C% A% {g}]'# enable 256 colorsattrcolor b "I" termcapinfo xterm 'Co#256:AB=\ E [48t5 % dm:AF=\ E [38th 5bot% dmink defbce on
In a session with multiple windows open, a reminder of which windows have focus activity and which windows have background activity is particularly useful. It is similar to a terminal task manager.
This is the end of the content of "what are the skills for using GNU Screen". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.