Terminal
A terminal emulator, terminal application, term, or tty for short, is a program that emulates a video terminal within some other display architecture. Though typically synonymous with a command line shell or text terminal, the term terminal covers all remote terminals, including graphical interfaces. A terminal emulator inside a graphical user interface is often called a terminal window. A terminal window allows the user access to a text terminal and all its applications such as command line interfaces (CLI) and text user interface applications. These may be running either on the same machine or on a different one via telnet, ssh, or dial-up. On Unix-like operating systems it is common to have one or more terminal windows connected to the local machine. Terminals usually support a set of escape sequences for controlling color, cursor position, etc. Examples include the family of terminal control sequence standards known as ECMA-48, ANSI X3.64 or ISO/IEC 6429.
- Taken from Wikipedia.
Contents |
What is a Terminal
A terminal is a window in which you may type text-based commands.
How to start a Terminal
Starting a terminal is simple but very useful. Almost everything can be done via a terminal!
The procedure differs depending on your choice of window manager. However, currently all window managers in the G-Bar allow you to start a terminal by right-clicking on the desktop.
IceWM
Basic commands
See the UNIX page for an introduction to the basic commands.
Note: Whenever a box like this
$ echo "Hello world!"
appears on the wiki, it's most likely a snippet from a terminal. If there's a $ as the first sign in a line, it's an input. Meaning it's a command you have to type in, not including the $. If the line is starting without a $, it's an output, it's an information given by the input.
Tips
Make jobs run after you have logged out
This can be achieved by running
$ nohup command < /dev/null 2> /dev/null &
The nohup command makes sure that the command doesn't die on exit. The < /dev/null redirects standard in (STDIN) to /dev/null which is basically nothing. 2> /dev/null redirects standard error (STDERR) to /dev/null which in this case is like a trashcan. The output of the command will be written in a file called nohup.out
You cannot run programs that require a graphical user interface, eg. Matlab. Instead, you should turn off the GUI. In Matlab, this is done with:
$ matlab -nodisplay -nodesktop -nojvm -nosplash
Using screen
Instead of having several terminals open, you can use screen which enables you to run multiple programs in one terminal. Starting screen is done by
$ screen
in the terminal. Exiting the session can be done by typing exit in all screen windows.
Beware that the sessions for screen are kept in /tmp which is emptied once a week. Thus, if you plan to use screen, you may wish to change the default setting for this directory. This can be done by creating a folder:
$ mkdir ~/tmp/screendir $ chmod 700 ~/tmp/screendir
export SCREENDIR=${HOME}/tmp/screendir
The last line should go in your .bashrc


