SHELLTIPS: some tips for GNUSCREEN

Source: Internet
Author: User
Due to work environment problems, the screen command has become increasingly valuable recently. The following is a summary of the tips for using screen commands. The most commonly used parameter combination: screen-ls lists the existing screenscreen-D-R to enter the specified screen name. If not, create a screen with this name because it is often used, I put the two

Due to work environment problems, the screen command has become increasingly valuable recently. The following is a summary of the tips for using screen commands. The most common parameter combination: screen-ls // list existing screen-D-R // enter the specified screen name. If no, therefore, it is very common to create a screen with this name.

Due to work environment problems, the screen command has become increasingly valuable recently. The following is a summary of the tips for using screen commands.

The most common parameter combinations:

Screen-ls // list existing screens
Screen-D-R // enter the specified screen name. If no screen name exists, use this name to create a screen.

Since these two commands are frequently used, I have obtained the alias:

Alias sl = 'screen-ls'
Alias sr = 'screen-D-R'

In addition to commands, you can also press Ctrl + ac to create screen; Ctrl + aa to switch between two screens; Ctrl + ad to detach from screen; Ctrl + a, jump to the screen referred to by a number.

Case $ TERM in
Screen *)
# This is the escape sequence ESC k \ w ESC
# Use current dir as the title
SCREENTITLE = '\ [\ ek \ W \ e \]'
PS1 = "$ {SCREENTITLE }$ {PS1 }"
;;
*)
;;
Esac

Then, modify the screen configuration file, add the status bar, and add the following in. screenrc:

Caption always '% {= B cw} %-w % {= rb db} %> % n % t % {-} % + w % {-B} % <% {= kG} %-= % D % c % {-}'
Shelltitle '$ | bash'

The final result is:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.