ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

Terminal and shell: command structure and getting help

Lesson 1.27 minBeginnerDecember 1, 2026
Open

This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.

Key points

  • The terminal is the window you type in; the shell is the program that runs the commands. On Ubuntu the default shell is bash.
  • A command has three parts: the command, options and arguments: ls -l /etc.
  • A short option uses one dash (-l), a long option uses two (--all). Short options can be combined: -la.
  • Linux is case-sensitive: ls works but LS does not; File.txt and file.txt are two different files.
  • For help: man command (full manual), command --help (short list), whatis command (one-line summary). Tab completes names, ↑ brings back earlier commands.

Terminal versus shell

When you connect to a server over SSH you get a black window. That window is the terminal: it only shows text and takes keyboard input.

The program that understands and runs what you type is the shell. On Ubuntu the default shell is bash (Bourne Again SHell). You can check which shell you are in like this:

srv-web01
ali@srv-web01:~$ echo $SHELL
/bin/bash

$SHELL is a variable: the system keeps the path of your shell in it. echo prints the text it is given.

The structure of a command

Almost every command follows the same pattern:

PartExampleWhat it does
CommandlsWhat to do (show a list)
Option-lHow to do it (in detail)
Argument/etcWhat to do it on (which directory)
srv-web01
ali@srv-web01:~$ ls -l /etc/hostname
-rw-r--r-- 1 root root 10 Dec  1 10:00 /etc/hostname

Options come in two forms:

  • Short: one dash and one letter: -l, -a, -h. Several can be combined: ls -l -a -h is the same as ls -lah.
  • Long: two dashes and a word: --all, --human-readable. The long form is easier to read and is common in scripts.

Watch the letters: Linux is case-sensitive. ls -l and ls -L are different options, and Readme.txt and readme.txt are two separate files.

Saving time: Tab and history

  • Tab: type the start of a command or file name and press Tab — the shell completes the rest. Press it twice to list the matching options.
  • ↑ and ↓: bring back commands you typed before, so you do not retype them.
  • Ctrl+C: stops a running command (for example a ping that never ends).
  • Ctrl+L or clear: clears the screen.

Tab is not only convenient: completing a path with Tab leaves no room for typos.

Getting help

You do not need to remember every command. On Linux the help lives inside the terminal.

srv-web01
ali@srv-web01:~$ whatis ls
ls (1)               - list directory contents
ali@srv-web01:~$ ls --help | head -n 4
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
WayWhat it givesWhen
whatis lsA one-line descriptionTo remember what a command does
ls --helpA short list of optionsTo find the option you need quickly
man lsThe full manualTo learn in detail
apropos copySearches commands by keywordWhen you do not know the command name

Moving around a man page: space — next page, /word — search, n — next match, q — quit.

Where is a command?

Sometimes you need to know what a command actually is:

srv-web01
ali@srv-web01:~$ type cd
cd is a shell builtin
ali@srv-web01:~$ which ls
/usr/bin/ls

cd is built into the shell, while ls is a separate program in /usr/bin. The shell looks for the command you type in the directories listed in the PATH variable.

You can try these commands in the Linux simulator: type help, then man ls.

Check yourself

5 questions · answers are shown instantly · 3 correct answers complete the lesson

1What is the default shell on Ubuntu?

The default user shell on Ubuntu is bash: echo $SHELL → /bin/bash.

2In ls -l /etc, what is /etc?

ls is the command, -l is an option and /etc is the argument it works on.

3Which command is the same as ls -lah?

Short options with one dash can be combined.

4How do you open the full manual of a command?

man opens the manual; press q to quit.

5Which is true about File.txt and file.txt?

Linux is case-sensitive.
Was this lesson useful?

Comments

Sign in to comment.