Basic Linux BASH commands

Using the command line

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.

If sudo is installed, you can enter sudo prior to a command, for example:

# sudo mkdir some-directory
Note: You will be prompted enter your user password to continue.

Some distributions allow a user 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.

Run a process in the background:

Put & on the end of a command and the process will start in the background and the prompt will be available immediately.

Combining commands:

Put && between commands and they can be entered as one command. The subsequent command is only started if the previous command ran successfully.

Command guides

Go back to the How-to Guides main page.

Contact

Online form
info@forwestmedia.com
07776 020 262

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.

^ Top of page ^ | Home | Contact | Site map | Copyright © 2007-2012 Forwest. All rights reserved

Valid XHTML 1.0 Strict Valid CSS!