Linux Command Line for Beginners › Module 1: Getting Started › Lesson 1.1

What the Command Line Is

Free previewLesson 1.1 · about 15 minutes

This lesson has no exercises. It sets the scene for the rest of the course.

Get the full course

10 modules of hands-on Linux command line skills — a live practice terminal inside every lesson, in your browser, nothing to install. Lessons 1.1 and 1.2 are free; the rest of the course is Rs. 300 + 18% GST.

Enroll Now — Rs. 354.00

By the end of this lesson you will be able to

  • say in plain words what the command line, the terminal, the shell and the prompt are
  • explain why people still type commands when they could click, or ask an AI assistant
  • read a command and its reply on the screen and tell which part is which
  • find your way around a lesson: demonstration terminals, exercises, the checker and the quiz
  • say who Harriet and George are, and whose office computer you will be using throughout the course

A blank window and a blinking cursor

It is Harriet Cole's first morning as office assistant at Larkspur Press, a small publisher of novels, nature books and local history. George Whitfield, the office manager, shows her to her desk. On the screen there is a plain window with one short line of text and a cursor blinking after it.

“Is that it?” Harriet asks. “No menus, no buttons? I thought everything was done by clicking these days. Or I could just ask an AI assistant to do it for me.”

George smiles. “Clicking is fine for some jobs, and the assistants are genuinely useful. But this little window is how the office computer really gets run, and it is how most of the world's computers get run. Give it a week and you will wonder how you managed without it.”

This course follows Harriet through that week and beyond. You will learn exactly what she learns, on a copy of the same office computer, and by the end you will be comfortable doing real work by typing commands.

What the command line is

There are two broad ways to tell a computer what to do. The one most people know is point-and-click: windows, icons and menus that you choose with a mouse or a finger. The other is the command line: you type an instruction as a line of text, press Enter, and the computer replies with text.

Here is a very small conversation with the office computer. Harriet asks who she is logged in as, and the computer answers:

$ whoami
harriet

The line starting with $ is what was typed. The line underneath is the reply. That is the whole pattern of the command line: you type, it answers, and then it waits for the next instruction. In this course a $ at the start of a line always marks something typed; you never type the $ itself.

A slightly longer conversation: Harriet shows the jobs waiting in her to-do list, then asks for the date.

$ cat todo.txt
Sort out the archive folder
Send the March catalogue to the printer
Check the print log for errors
Back up the invoices
$ date
Mon Mar  2 09:00:07 UTC 2026

You do not need to understand these commands yet. You will meet whoami and date properly in the next lesson and cat in Module 4. For now, notice the shape: a short word, perhaps followed by more words, and a reply.

Terminal, shell and prompt

Three words come up again and again. People often use them loosely, as if they meant the same thing, but it helps to know the difference.

WordWhat it isA way to think of it
terminalthe window that shows text and passes on what you type. Long ago it was a separate screen and keyboard wired to a large computer in another room; today it is usually just a program that draws a window.the telephone handset
shellthe program running inside the terminal that reads each line you type, works out what you mean, runs the right program and shows you the result. The shell used on most Linux computers, and in this course, is called bash.the person on the other end of the line
promptthe short piece of text the shell prints when it is ready for your next command“Go ahead, I'm listening”

A command is what you type at the prompt: the name of a program, often followed by extra words that tell it what to do. The phrase the command line means the whole way of working: typing commands to a shell in a terminal.

On Harriet's computer the prompt looks like this:

harriet@larkspur:~$

It tells her that she is the user harriet, working on the computer called larkspur, in her own home folder (that is what the ~ means), and that the shell is waiting ($). The next lesson takes the prompt apart piece by piece.

You can try a live terminal right now. Click one of the buttons to type a command into the terminal below, or click inside the terminal and type it yourself, then press Enter.

hostname prints the name of the computer, which is the same larkspur you see in the prompt. If you type something the shell does not recognise, it simply says so, and waits for you to try again. Nothing breaks.

What Linux is

Linux is an operating system: the core software that runs a computer and lets programs use its memory, disks and screen. It is free, and it runs on an enormous range of machines, from tiny devices to most of the servers that make up the internet. There are many different packaged versions of Linux, but the command line you will learn works in almost exactly the same way on all of them. The office computer in this course runs a version called Practice Linux.

Why type, when you could click?

Harriet's question is a fair one. Point-and-click is friendly and easy to discover. AI assistants can write whole paragraphs, and whole programs, on request. So why learn to type commands? George gives her five reasons.

1. Many computers have no screen at all

The computers that store websites, send messages, keep records and run AI assistants themselves sit in large buildings full of racks, or are rented by the hour as cloud computers. None of them has a screen, a mouse or anyone sitting in front of it. People look after them from far away by opening a terminal and typing commands. The same is true of many small devices: routers, sensors and the little boards inside machines. If you want to work with any of these, the command line is not one option among several; it is the way in.

2. Commands are exact

A command says precisely what should happen, to which files, in which order. There is no “I think I clicked the second one”. Because a command is just text, you can write it down in a note, send it to a colleague, keep it for next month and run it again with the same result. When something goes wrong, the command and the computer's reply show exactly what happened, which makes problems far easier to explain and to fix.

3. Commands are fast, especially for big jobs

Some jobs are slow and fiddly with a mouse but take one line to type. Suppose George wants to know how many times the office printers reported an error this week. By hand, he would open the log and read through it line by line. At the command line, he asks:

$ grep -c ERROR logs/print.log
4

and then, to see the four lines themselves:

$ grep ERROR logs/print.log
2026-02-27 10:41:19 ERROR printer-2 paper jam in tray 2
2026-02-27 11:31:10 ERROR printer-2 paper jam in tray 2
2026-02-28 10:20:51 ERROR printer-1 cover open
2026-03-02 08:59:12 ERROR printer-2 paper tray empty

The log here is short, but the same command works just as quickly on a log of a million lines, or on a hundred logs at once. You will learn grep in Module 5. Try it now if you like:

4. Commands can be saved and run automatically

Once a job is a list of commands, you can save that list in a file, called a script, and run the whole job with one word. The computer can even run it for you every night while the office is empty. Backups, tidying old files and daily reports are nearly always done this way. You will write your own scripts in Module 9, and in the final project you will write one that makes a dated backup of the office files.

5. AI assistants speak in commands too

This is the reason George thinks matters most today. Ask an AI assistant how to do almost anything on a computer and it will very often answer with commands to type. Some assistants go further and run commands for you in a terminal of their own. That is a great help, but only if you can read what is being suggested, because:

Someone who understands commands can use an assistant like an expert colleague: read its suggestion, spot the mistake, adjust it and run it with confidence. Someone who does not is pasting in instructions they cannot check. This course aims to make you the first kind of person.

Common mistake: running a command you do not understand

Whether a command comes from an assistant, a colleague or a web page, read it before you press Enter. Ask yourself three questions: What program does this run? Which files or folders does it touch? Does it change or delete anything? If you cannot answer, find out first. Lesson 1.3 shows you how to look up any command, and the rest of the course gives you the knowledge to answer those questions quickly. A few seconds of reading can save a day's work.

There is one more quiet advantage. The commands you learn here have worked in much the same way for decades and will go on working for decades more. Menus change with every new version of a program; ls still lists files much as it did long before you were born. Time spent learning the command line keeps paying you back.

What will I be able to do?

By the end of the course you will be able to move around the folders of a Linux computer, create, copy, move and delete files safely, read and search inside files, combine small commands into powerful ones, understand and change who is allowed to use which files, keep an eye on running programs and disk space, edit files and write small scripts that do jobs for you. The last lesson is a project in which you tidy up the Larkspur Press archive from start to finish using everything you have learned.

The course is organised into ten modules:

ModuleWhat you learn
1 Getting Startedwhat the command line is, your first commands, and how to get help
2 Finding Your Way Aroundthe tree of folders, listing files, moving about, and typing less
3 Working with Files and Foldersmaking, copying, moving, renaming and deleting
4 Reading Fileslooking inside files, counting and finding out what a file is
5 Searchingfinding text inside files, and finding files themselves
6 Pipes and Redirectionsaving output and joining commands together
7 Users and Permissionswho owns what, who may do what, and the all-powerful root user
8 Programs and the Systemrunning programs, background jobs, disk space and memory
9 Editing and Simple Scriptsediting files, variables, and writing your own scripts
10 Good Habits and the Final Projectlinks, archives, safe habits, and the final project

You do not need any previous experience. If you can type and you are curious, you have everything you need.

How the course works

Every lesson is a page like this one, and every page has the same parts, so you always know where you are.

The practice computer

Every terminal in the course is connected to a pretend Linux computer that runs entirely inside your web browser. It is a copy of the Larkspur Press office computer, complete with Harriet's files: manuscripts, invoices, a book catalogue, staff lists and logs. Because it is pretend, nothing you type can harm your own computer, and you can experiment as boldly as you like. Each terminal starts fresh, and you can put it back as it was at any time.

The practice computer understands the commands this course teaches, and behaves like a real Linux computer when you use them. Its clock is fixed to a Monday morning, 2 March 2026, so the dates it shows will not match your calendar. Where a real computer would behave a little differently, the lesson tells you.

Exercises and the checker

Each exercise describes a job, such as “list the invoices, newest first” or “make a folder for this month's reports”. You do it by typing commands in the exercise's terminal, and then press Check my answer. The checker looks at the result: which files exist, what they contain, which folder you ended up in, what was printed. There is usually more than one correct way to do a job, and the checker accepts any of them.

If something is not right yet, the checker tells you what is missing, and often gives a hint based on what you typed. If you are stuck, Show solution shows one correct answer, and Reset gives you a fresh terminal to try again. The progress bar at the top of each lesson counts the exercises you have completed.

A keyboard helps

The lessons work on a phone or tablet, but the command line is all about typing, so a real keyboard makes the exercises much more comfortable. The Up and Down arrow keys and the Tab key, which you will meet soon, save a great deal of typing.

Meet the people at Larkspur Press

Larkspur Press is small: nine staff, one office computer and a steady stream of books. You will get to know them through the files on the computer.

“Right,” says George, pulling up a chair. “Enough talk. Let's type something.” That is exactly where the next lesson begins.

Quick check

Four questions to confirm the main ideas. Choose an answer to see the explanation.

Which of these is the shell?

A cloud computer is being set up far away. Why is the command line usually the way to work on it?

An AI assistant suggests a command to tidy your files. What should you do before running it?

In an exercise, how does the checker decide whether you have succeeded?

Summary

  • At the command line you type an instruction as text, press Enter, and the computer replies in text.
  • The terminal is the window, the shell (here, bash) reads and runs your commands, and the prompt shows the shell is ready.
  • The command line matters because servers and cloud computers have no screens, commands are exact and repeatable, they handle big jobs quickly, and they can be saved as scripts and run automatically.
  • AI assistants often answer in commands, so understanding commands lets you check their suggestions before running them.
  • Every lesson has examples with real output, live practice terminals that cannot harm your computer, and (from the next lesson on) five exercises with a checker that accepts any correct method.

Found a mistake on this page, or something unclear? Report a problem and mention “Linux Lesson 1.1”.