Command Line Basics


There are several different shells on Linux, these are just a few:

With the most common one being Bash.

When using an interactive shell, the user inputs commands at a so-called prompt. For each Linux distro, the default prompt may look a little different, but it usually follows this structure:

Default

username@hostname current_directory shell_type

where:

Here are some examples of the default prompt on different distros:

$ Regular user Ubuntu or Debian GNU/Linux

carol@mycomputer: ~$

# Super user Ubuntu or Debian GNU/Linux

root@mycomputer: ~#


$ Regular user Red Hat or CentOS

[carol@mycomputer ~] $

# Super user Red Hat or CentOS

[root@mycomputer ~] #