Command Prompt #
When you open the terminal, you see a command prompt that looks like user@host:~$
user → This is your username on the system. In the example above, this is ubuntu.
host → This is the machine, local or remote, you’re currently logged into. In the example above, this is ip-172-31-21-134.
~ → This represents your current directory. In the example above, this is ~/myfolder.
$ → The end of the prompt indicates that the shell is ready to receive input from the user. It is a common convention in Unix-like systems to end the shell prompt with $ for regular users and # for the root user.
To execute a command, simply type it after the prompt and hit the return key. If the command is recognized by the shell (like date
in the example above), it will be executed and the terminal will display any output that it generates.
Go to the next section to learn about the most useful Bash commands.