Rob's web

Commandline

Consoles

Linux is a multi-user and multi tasking system.

In text-mode, ther are six virtual consoles available. You can switch between them by using Alt + F1 to Alt + F6. The seventh console is use by the X11 server.

If you want to switch to a text-console from X11, you should use Ctrl + Alt + F1 to Ctrl + Alt + F6. Alt + F7 brings you back.

There are also ways to connect from a remote machine over internet or LAN bij Telnet or SSH. Never use telnet over the internet because it is unencrypted. Use SSH instead.

Login

After boot to text-mode or switching to a console you have to login. You can login as user root or as a normal user.

The login program terminate and Linux starts by default bash.

When in graphic desktop you can open a console window.

Bash (Unix shell)

Bash is a Unix shell written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell (sh). Released in 1989, it has been distributed widely as the shell for the GNU operating system and as the default shell on Linux, Mac OS X and Darwin. It has been ported to Microsoft Windows and distributed with Cygwin and MinGW, to DOS by the DJGPP project, to Novell NetWare and to Android via various terminal emulation applications.

Bash is a command processor, typically run in a text window, allowing the user to type commands which cause actions. Bash can also read commands from a file, called a script. Like all Unix shells, it supports filename wildcarding, piping, here documents, command substitution, variables and control structures for condition-testing and iteration. The keywords, syntax and other basic features of the language were all copied from sh. Other features, e.g., history, were copied from csh and ksh. Bash is a POSIX shell but with a number of extensions.

The name itself is an acronym, a pun and descriptive. As an acronym, it stands for Bourne-again shell, referring to its objective as a free replacement for the Bourne shell. As a pun, it expressed that objective in a phrase that sounds similar to born again, a term for spiritual rebirth. The name is also descriptive of what it did, bashing together the features of sh, csh and ksh.

Prompt

After login you wil see a prompt.

When you login as root you get a different prompt. In the next line you see an example.

[root@server1 ~]#

The user promt looks like:

[user@server1 ~]$

The ~ is the home directory from the user. In other cases you find the last directory-name in the path. See below.

[root@server1 ~]# cd /srv/www/vhosts/
[root@server1 vhosts]#

Logout

When finished type exit and the bash closes and the login prompt returns.

[root@server1 ~]# exit