Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
By keefaz at 2005-03-05 10:52
There are two tools that can be usefull when working in console :
script is a nice program that let you monitor in one or
more terminals what you type in another terminal.
- Open two X terminals in your X session or use the Linux
ttys (ctrl + alt + F1-6)
- On one terminal, type :
script -f output
- On another terminal (or more), type :
- Then return to the first terminal and execute any
command you like (ls, cd, ping...)
The output should be appear on every terminals where
you cat output fifo.
- Exit script session by typing exit command in the first
terminal (the one which you started script command)
man script for more infos
screen is a terminal screen manager (like a window manager
but for consoles)
- In a terminal, type : screen
screen is now started, it has opened one screen, you should
see the prompt of your shell, waiting for commands
- Name this screen with typing : [ctrl + a], then A (note that
A is uppercase, so you may need to type:
[ctrl +a], then [shift +a]
Erase the default title using backspace key and name it whith
any name you want, say "Shell 1", press <enter> key.
- Create a new screen with : [ctrl + a] [ctrl + c], name it
([ctrl + a], [shift + a]), say "Shell 2"
- To switch between these 2 screens, type [ctrl + a], then ["]
(double quote key), you should see a list of all your screens
To enter on one, just select it with the top/bottom arrow keys
and press <enter>
- To exit screen, just type exit in all your opened screens
Tips for ssh session :
Say you run a command that take long time to complete
(say updatedb or a system upgrade), you can detach your
screen, exit ssh session, let the command run on the
remote host and return to the screen later :
- ssh to your remote host, run screen, run your command,
then type : [ctrl + a], [shift + d], [shift + d]
You now are now logout of your ssh session, screen in
remote host is detached so it keep running your command
To return to your screen, ssh into your remote host, then
use : screen -r
You are now in the screen showing output of the command
you issued before.