Now let’s open a new screen by hitting the ++ key combination. The tail command will start following input on the syslog log file (as expected). Let’s issue the command sudo tail -f /var/log/syslog. You will now find yourself at what looks like a standard prompt. Hit either the Spacebar or Enter to exit the welcome window. ![]() Where NAME_OF_COMMAND is the actual command you’d run. You can customize that screen to make it easier to remember what screen is running what command, like so: You will be greeted by a welcome window ( Figure A). Before you start working, issue the command screen. Secure Shell to your remote Linux server. ![]() If you’re using Fedora, that install command would be sudo dnf install screen. If you find it’s not there, you can install it with the command sudo apt install screen. On Ubuntu Server 16.04, the screen tool is already installed. Let’s walk through the process of using this handy command. You can open as many screens as you need, switch between them, detach them, list them, and reconnect to them. When you call the screen command, it creates a single window where you can work as normal. ![]() What is screen? Simply put, screen is a full-screen window manager that multiplexes a physical terminal between several processes. I’ll be demonstrating on Ubuntu Server 16.04, but screen is available for nearly all Linux distributions. I want to show you how to make use of this Linux admin tool. With screen, you can reconnect to that server and pick up where you left off with your last command. How many times have you secure shelled into your data center Linux servers, only to have (for whatever reason) your remote secure shell connection broken? When you reconnect to that server, is that critical command you issued still running? Or did the severed connection put the kibosh on the command? Not only can this be incredibly confusing, it can also be a cause for you to lose precious work and time.įortunately, there’s a way around this: The screen command. Jack Wallen shows you a handy Linux trick that can go a long way to prevent you from losing precious command line work due to questionable network connections to your remote servers. ![]() How to use the Linux screen command to keep your remote processes running
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |