May 17, 2008

Terminals

Terminals

UNIX has been an operating system running on a wide variety of machines interconnected with other machines called terminals (dumb terminals) consisting of keyboards, and monitors interconnected to the central computer. Users at these terminals were basically teletyping, using string 'tty' for terminal device files.

There were no standards that comply with the requirements and every brand had its own “specs” such as its own keyboard, its own display, its own ideas in the signal transmission and reception, characters control codes and so on.

Linux terminals mostly use either 'vt100' or 'Linux' as their terminal type. In order to clean up the mess, a central file was created, the termcap '/etc/termcap'.

Xterms

In the early 90s the XFree86 was fine tuned and soon ported to Intel-based UNIX clones like FreeBSD, NetBSD or Linux. X has the capability of running multiple 'virtual' terminals. X even came with such an application, 'xterm'. Therefore you'll find that 'xterm' and 'virtual terminal' are often used.

Shells

The shell is part of the operating system (kernel), which translates the input/output (IO), allowing the user to communicate with the system by using commands. The first UNIX shell (sh) was written by Steve Bourne, and is called the 'Bourne shell. Many others shells were developed based on the original Bourne Shell. Linux's standard shell is 'bash', the GNU Bourne.

Command aliases

This table describes some aliases that you can use when executing commands. I though to present it here before you actually start working in the console

Alias

commands

Description

cd ..

executes 'cd ..'

go to parent directory

d

executes 'ls'

list directory

l

executes 'ls'

list directory

la

executes 'ls -a'

list complete directory, i.e. including files starting with a dot

ll

executes 'ls -l -k'

list directory in long format, i.e. with file attributes, print file size in KB and not in bytes

ls

executes 'ls -F --color=auto'

list directories, append file type indicators and use colors

lsd

executes 'ls -d */'

list subdirectories only, no files

md

executes 'mkdir'

create directory

p

executes 'cd -'

go back to previous directory

rd

executes 'rmdir

delete (empty) directory

s

executes 'cd ..'

go to parent directory

used

executes 'du -sm * | sort -n'

display disk usage of subdirectories in MB, list by size


Note. The tab key is also used as shortcut, when typing a command and some of the first characters of a file name – hit the tab key and the file name will be auto completed.

No comments:

Post a Comment

Popular Posts