Intro to Command Line
Command Prompt
First item in the prompt is a line representing the user name, followed by the "
@
" sign, the computer host name, a colon ":
", the current working directory and the "$
" sign.
whoami
whoami
- Returns the user name of the current user
Note Linux is case-sensitive, so the commands are too.
hostname
hostname
- Returns the name of the current host
pwd
pwd
- Print working directory
ls
ls
- List the contents of a directory
cd
cd
- Change working directory
📌 Use only
cd
to go back to the current user's home directory
alias
alias
- list bash aliases
Last updated