Getting Started with the Linux Terminal | First Commands
terminal, shell, bash, command prompt, first Linux commands, pwd, whoami, echo
Getting Started with the Linux Terminal
The terminal is the primary tool for interacting with a Linux system. Also called the command line interface or CLI, the terminal allows you to type commands that the shell interprets and executes. Understanding the terminal is the most important skill in Linux basics because almost every administrative and development task is performed here.
What Is a Shell?
The shell is a program that reads your commands and passes them to the operating system for execution. The most common shell in Linux is Bash, which stands for Bourne Again SHell. When you open a terminal, you are inside a Bash session by default on most distributions. The prompt you see — usually ending with a dollar sign for regular users and a hash sign for root — indicates the shell is ready for input.
Opening the Terminal
On Ubuntu with a desktop environment, press Ctrl+Alt+T to open a terminal. On a server, you connect via SSH. Once inside, you will see your prompt, which typically shows your username, the hostname, and your current directory.
Your First Linux Commands
The whoami command prints the username of the currently logged-in user. The pwd command prints the working directory — the directory you are currently inside. The echo command prints text to the terminal.
whoami
pwd
echo "Hello, Linux!"The date command prints the current date and time. The uname -a command prints detailed information about your Linux system, including the kernel version, hostname, and architecture.
date
uname -aUnderstanding the Command Structure
Most Linux commands follow the pattern: command [options] [arguments]. Options modify the behavior of the command and are usually preceded by a hyphen. Arguments are the files, directories, or values the command acts on. For example, ls -la /home runs the ls command with the -l and -a options targeting the /home directory.
Getting Help
Every Linux command has a manual page accessible with the man command. Type man ls to read the full documentation for the ls command. Press Q to exit the manual viewer. For a quick summary, most commands support the --help flag.
man ls
ls --helpThese terminal commands form the foundation of everything you will learn throughout this Linux tutorial. Practice them until typing in the terminal feels natural.
