Basic Linux BASH commands

Shell prompts:

After opening a terminal window, a shell prompt be visable from the top left of the session.

If you are a standard user, the prompt symbol will look like this: $. From the terminal you will see:
user@host:~$
If you are a superuser, the prompt symbol will look like this: #. From the terminal you will see:
user@host:~#

Permitting administrative tasks:

To run administrative tasks in Linux you first need elevate the user's privileges.

Within Ubuntu, you can type sudo prior to a command, for example:
sudo mkdir some-directory

Note: You will be prompted enter your user password to continue.

Within Debian, a user can be allowed to assume the identity (substitute user) of root, or another user, for example:
su

Note: You will be prompted enter the root password to continue.

View previous screen information:

To access previous screen information press Shift + Page Up. This allows you to scroll up through previous terminal data.

Find out package (applications or programs) information:

To list all currently installed packages:
dpkg -l
Ouputs if the package is installed, and lists the package details if available:
dpkg -s [package]

Shuting down and rebooting the system:

Shut down the system, then reboot:
shutdown -r now
Shut down the system and leave it off (halt):
shutdown -h now
Shut down the system, then reboot and force an fsck check:
shutdown -rF now

Go back to the How-to Guides main page.

Search

Starter website

Offering small businesses and individual users the opportunity to have their own website on the internet, our 'starter websites' are available for only £150.

new site offer

To find out more and to see an example of the type of site offered, view our example starter website page.