If you want to open up the same htop terminal, first type in the following command: screen -ls From here you can work on something else, while the previous window will run in the background. Next, we will use both CTRL+a and CTRL+d commands to detach the execution from the terminal. You can run htop by simply typing the following command in your terminal: htop We can install it on Debian, Ubuntu, Linux Mint and its derivatives with the following command: sudo apt install htop This is especially great for server administrators.įor this example, I will use htop. One of the great qualities of Screen is the ability to perform actions and leave them in the background so that when we return to them they’re still there. How to Manage Multiple Sessions Using Linux Screen To change to the next terminal, we press CTRL+a TAB. For example, using Ctrl+a S splits the terminal horizontally: It is also possible to split the terminal screen. These are the main commands you’ll be using: Commandsĭelete a Ctrl+a, which useful if you made a mistake Once we have started a new session it is necessary to learn how to use it. Important! Take note of the lowercase and uppercase keys when performing commands. They all follow a Ctrl+* * structure, where * are the variables. Screen uses commands to perform terminal multiplexing and the commands are easy to learn. We recommend you give the session a descriptive name and you will have no problem identifying it. We can also start a session and give it a name by using the -S variable. So, we need to rerun the command by typing screen again. To check it, just type exit in and press Enter. Do not be worried, we have already started a new Screen session. To run Linux screen, we just have to type the word in our terminal session: screenĪfter pressing the Space key, you will see the terminal again. Using Linux Screen on Any Linux Distribution yum install screenĪt the end of the installation, we can check the current version of Screen, using the following command line: screen –versionĬongratulations, now you can finally use Screen. Or if the user can’t run sudo commands, we need to run it as a root user. If you are using CentOS 7, you can install it using the following: sudo yum install screen Open up your terminal and type: ssh the case of Debian, Ubuntu or Linux Mint and its derivatives, you can execute the following command: sudo apt install screen If your system doesn’t have it preinstalled, don’t worry, the installation process is easy.įirst, we need to connect to our server using the SSH command. Screen is usually installed by default on all major Linux distributions. Linux Screen might be basic in its structure, but every Linux user should know how to use it. When the terminal is reaccessed, the terminal will return to the very same screen you worked on before shutting down. Screen works like this – if you work on a terminal session while using Screen, once you’re finished with your work and turn off the computer, it will save at that point. In other words, Screen divides a physical terminal into multiple virtual sessions, stops and summarizes the activity in them. Often official documentation calls it a GNU Screen and is used for terminal multiplexing. A Linux Screen is a terminal application developed by the GNU project.
0 Comments
Leave a Reply. |