Saturday, 2 November 2013

Multitask in the Linux Terminal

The oldest operating system I have ever studied is MS-DOS. This is a single tasking operating system, in the easiest way, you can see DOS like a single command line (cmd) window. In a long time, I use DOS single tasking and in the habit, I use cmd only in a single window. And when I use Linux with terminal (more power than cmd in window), the first time, I still use one terminal window, single tasking. But because of job requirements and the convenience of multitask, I changed, have use terminal with multi-task function (in many window/tab or in single window) or can be called: Multiple screen/area.


Multiple window and mutiple tab
With linux GUI (graphic user interface), these are the easiest ways.

Multiple window and multiple tab in terminal


With many terminals, you can easy change folder, run many terminal progresses like install a software and download a file and edit a text simultaneously.


Virtual consoles

Multiple window and mutiple tab are easy but What you do if you control a Ubuntu server without GUI ?

Linux has a function for this, this is virtual consoles, you can do with 6 terminals by use:
Ctrl+Alt+F1
for the first console, Ctrl+Alt+F2 -> F6 for other,  Ctrl+Alt+F7 for return graph (if GUI is installed).


Multitask with screen command

Virtual consoles is good function but if you telnet/ssh from pc to a server with putty, cmd or other, you can't use Ctrl+Alt+F<1-6>. You can do with many window by retype connect commands and password, so slow, and you can use screen command to multitask terminals.

Install (in ubuntu/debian):

sudo apt-get install screen

Some basic command to use

Create a screen:
screen -S name
Exit/detache screen:
ctrl+A, D
Go to an  existed screen
screen -r name
Terminal a screen:
ctrl+A, K


Other way

use a software can auto connect and auto fill password like Multi-Tabbed PuTTY, secure crt ..

Multi-Tabbed PuTTY tientus blogger



No comments:

Post a Comment