Skip to main content

A Basic Understanding Of screen On Centos

Description

Screen allows you to run scripts or commands in their own virtual window within the terminal, essentially allowing you to have a terminal multi-tasking environment where you can switch between your windows or another users at will. This howto will give you the basics of screen plus some other useful features that may help you in your daily administration tasks. This howto is intended to get you up and running with basic screen functionality within just a few minutes. Please read the manpage for a far more in-depth description of features and options.

Requirements

These are requirements for successfully completing this document.
  1. Root or appropriate sudo access to the system.

Doing the Work

Basic description of what will be done and what is expected.
  1. Install screen if it’s not already installed.
  2. yum install screen
  3. Setup screen for multi-user mode.
  4. Multi-user mode is helpful for sharing a terminal and showing something in real-time because multi-user mode allows 1 or more people observe another performing commands or other system maintenance, or it could allow more than one user access to the status of scripts or custom commands running in separate screens.
    setuid the screen binary.
    chmod u+s /usr/bin/screen
    Edit /etc/screenrc and add this at the top:

Useful screen commands

  • List a particular users screen sessions.
  • screen -list username/ (the forward slash is important)
  • List your own active screen sessions.
  • screen -ls
  • Re-attach to a specific users screen and session.
  • screen -x username/shared-session
  • Start a screen session and give it a unique name.
  • screen -S unique_name
  • Detach from a running screen session leaving it running in the background.
  • Hit the key combination:
    Control + A/a + D/d (not case sensitive)
  • Re-attach to a specific screen you’ve named.
  • screen -R unique_name
  • Power detach a screen that you are logged into from another location.
  • This is helpful if you’ve been accidentally disconnected from ssh while in a remote screen session and it’s still attached.
    screen -D unique_name

Troubleshooting & Testing

Explanation troubleshooting basics and expectations.
  1. Read the manpage:
  2. man screen
  3. Can’t find screen or it can’t be found via Yum?
  4. Make sure you’re running authentic Centos and not using a 3rd party VPS, Cpanel, or other shared hosting discount server.
    the output of this command should tell you what you have:
    uname -a; lsb_release -a; yum repolist all
    Should produce output similar to this:

D

Comments

Popular posts from this blog

upload file type rocket chat #Accepted file upload. Can not send .xlsx

Enabling File format for upload at ROCKET CHAT application/msword   - for .doc application/vnd.openxmlformats-officedocument.wordprocessingml.document   - for .docx application/vnd.ms-excel   - for xls application/vnd.openxmlformats-officedocument.spreadsheetml.sheet   - for .xlsx application/vnd.ms-powerpoint   - for .ppt application/vnd.openxmlformats-officedocument.presentationml.presentation   - for .pptx image/*,audio/*,video/*,application/zip,application/x-rar-compressed,application/pdf,text/plain,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Troubleshooting DRBD #Centos #DRBD

Troubleshooting DRBD  This article presents common DRBD problems and solutions. DRBD (Distributed Replicated Block Device) runs on the master and slave nodes only, and is responsible for mirroring the contents of a partition between master and slave.  Typical problems in DRBD include: A lack of Primary-Secondary connectivity The Secondary operating in standalone mode Both nodes reporting connectivity but neither one in the role of master Both nodes reporting themselves in the role of master Verify the DRBD status The following command is used to verify that DRBD is operating normally on the master and slave nodes. drbd-overview When run on the master node, the output should look like the following: 1:r0/0 Connected Primary/Secondary UpToDate/UpToDate C r----- /mnt/drbd  ... When run on the slave node, the output should look like the following: 1:r0/0 Connected Secondary/Primary UpToDate/UpToDate C r----- The following sections are exampl...

How to Add a Static TCP/IP Route to the Windows Routing Table #windows #route #add/delete

How to Add a Static TCP/IP Route to the Windows Routing Table In some specific types of environments, you might find it useful to add a static route to the routing table in Windows. Here’s how to go about it. RELATED:   How to Use Traceroute to Identify Network Problems A routing table dictates where all packets go when they leave a system—whether that system is a physical router or a PC. Most routers—including the one built into your Windows PC—use some form of dynamic routing, where the router is capable of selecting the best place to forward packets based on information it gets from other routers. You can see it at work if you use the  traceroute command  to watch the connections a packet makes as it reaches it’s final destination. Most routers also allow you to add a static route (one that doesn’t get dynamically updated) if you want to always forward certain traffic to a specific router or gateway. Why? Well, most people using Windows in t...