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:


If you are a superuser, the prompt symbol will look like this: #. From the terminal you will see:


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.

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

Valid XHTML 1.0 Strict Valid CSS!