Skip to main content

What is a Terminal?

A terminal (also called a terminal emulator) is a program that provides a text-based interface to your computer. Instead of clicking icons and tapping buttons, you type commands and read text output. The terminal is where you type instructions, and the computer responds with results.

Termux is a terminal. When you open Termux on your phone, you see a blinking cursor on a dark background -- that is a terminal waiting for your commands.

GUI vs. CLIโ€‹

There are two fundamental ways to interact with a computer:

GUI (Graphical User Interface) -- what most people use every day. You see windows, buttons, icons, and menus. You interact by tapping, clicking, and dragging. Android, Windows, and macOS are all GUI-based.

CLI (Command Line Interface) -- what a terminal provides. You see text. You type commands. The computer responds with text output. There are no buttons to click.

TaskGUI ApproachCLI Approach
Create a folderRight-click > New Folder > Type namemkdir my-folder
Copy a fileRight-click > Copy, navigate, right-click > Pastecp report.pdf backup/
See folder contentsOpen the folder, look at iconsls
Rename 100 filesClick each one, rename manuallyOne command with a pattern
Install softwareOpen app store, search, tap Installsudo apt install firefox
Find a fileUse the search function, waitfind / -name "report.pdf"

Neither approach is better in all situations. GUIs are intuitive for visual tasks and casual use. CLIs are faster for repetitive tasks, automation, and system administration.

โ„น๏ธNote

You do not have to choose one or the other. In ADL, you have both. The XFCE desktop gives you a GUI with windows and menus, and you can open a terminal inside that desktop whenever you need the command line. Most ADL users switch between both regularly.

Why Termux is a Terminalโ€‹

Termux is a terminal emulator for Android. "Terminal emulator" means it recreates the experience of a hardware terminal (the physical machines that connected to mainframe computers in the 1970s) as a software application.

When you open Termux, it:

  1. Creates a terminal window on your screen
  2. Starts a shell (a command interpreter, usually bash) inside that terminal
  3. Displays the shell's prompt, indicating it is ready for your input
  4. Sends your typed commands to the shell for execution
  5. Displays the output the shell produces

Termux is special among Android terminal apps because it comes with a complete Linux package ecosystem. It is not just a terminal -- it is a terminal with access to thousands of real Linux tools.

Anatomy of a Terminalโ€‹

When you open a terminal, you see a prompt. It looks something like this:

user@localhost:~$

Each part has meaning:

PartMeaning
userYour username
@localhostThe machine name
~Your current directory (~ means home directory)
$Indicates you are a normal user (# means root/admin)

After the prompt, you type a command and press Enter. The terminal displays the result, then shows a new prompt ready for the next command.

Common First Commandsโ€‹

If you have never used a terminal before, here are the most fundamental commands to learn:

pwd -- Print Working Directoryโ€‹

Shows where you currently are in the filesystem:

$pwd
Expected Result

/home/user

ls -- List Filesโ€‹

Shows the files and folders in your current location:

$ls

Add -la for detailed information including hidden files:

$ls -la
Expected Result

A list of files and folders with details like permissions, owner, size, and modification date. Lines starting with 'd' are directories. Lines starting with '-' are regular files. Files starting with '.' are hidden files.

cd -- Change Directoryโ€‹

Moves you to a different folder:

$cd Documents

Special shortcuts:

ShortcutMeaning
cd ~ or just cdGo to your home directory
cd ..Go up one level (parent directory)
cd /Go to the root of the filesystem
cd -Go back to the previous directory

mkdir -- Make Directoryโ€‹

Creates a new folder:

$mkdir my-project

cp -- Copy Filesโ€‹

Copies a file or directory:

$cp file.txt backup/file.txt

mv -- Move or Rename Filesโ€‹

Moves a file to a new location, or renames it:

$mv old-name.txt new-name.txt

rm -- Remove Filesโ€‹

Deletes a file:

$rm unwanted-file.txt
โš ๏ธWarning

The rm command deletes files immediately and permanently. There is no recycle bin or trash can in the terminal. Once a file is removed with rm, it is gone. Double-check your command before pressing Enter, especially when using rm -r (which deletes directories and everything inside them).

cat -- Display File Contentsโ€‹

Shows the contents of a text file:

$cat notes.txt

clear -- Clear the Screenโ€‹

Clears all text from the terminal window:

$clear

Terminal Inside the Desktopโ€‹

Once your XFCE desktop is running, you can open a terminal inside the graphical environment. XFCE includes xfce4-terminal, which provides a terminal window that runs alongside your other graphical applications.

This means you can have Firefox open in one window, a file manager in another, and a terminal in a third -- just like on a regular Linux PC.

You can open a terminal in XFCE by:

  • Clicking the terminal icon in the panel
  • Right-clicking the desktop and selecting "Open Terminal Here"
  • Using the keyboard shortcut (usually Ctrl+Alt+T)
โœ…๐Ÿ’ก Tip

Using a terminal inside XFCE is often more convenient than switching back to the Termux app. The XFCE terminal runs inside the Ubuntu environment directly, so you do not need to manually enter the proot environment -- you are already there.

Terminal Tips for Beginnersโ€‹

TipDetails
Use Tab to autocompleteStart typing a file name or command and press Tab. The terminal will complete it for you or show options
Use the up arrowPress the up arrow to scroll through previous commands. You do not need to retype them
Commands are case-sensitivels works, LS does not. Linux commands are almost always lowercase
Spaces matter in commandscd Documents is correct. cdDocuments is not
Use Ctrl+C to cancelIf a command is running and you want to stop it, press Ctrl+C
Read error messagesTerminal errors are usually descriptive. Read them carefully -- they often tell you exactly what went wrong
โ“Frequently Asked Questions
Do I need to memorize all these commands?
No. You will naturally remember the commands you use frequently. For everything else, searching online for 'linux command to [do something]' will give you the answer quickly. Over time, the common commands become second nature.
Can I break my system by typing wrong commands?
Most commands are safe. The potentially dangerous ones require sudo (administrator privileges) and usually ask for confirmation before doing anything destructive. As a beginner, avoid running commands you found online without understanding what they do, especially anything with sudo, rm -rf, or dd.
What is the difference between the Termux terminal and the XFCE terminal?
The Termux terminal runs in the Termux (Android) environment. The XFCE terminal (xfce4-terminal) runs inside the Ubuntu proot environment. Commands and packages available in each are different. For desktop Linux tasks, use the XFCE terminal. For Termux-specific tasks (like starting PulseAudio), switch to the Termux app.
Is there a way to undo a command?
There is no universal undo button. Some commands (like moving a file) can be reversed by running the opposite command (move it back). Others (like deleting a file with rm) cannot be undone. This is why it is important to be careful with destructive commands.

Summaryโ€‹

A terminal is a text-based interface where you type commands to control your computer. Termux is a terminal emulator that brings Linux command-line tools to your Android phone. In ADL, you use the terminal for system setup and administration, while the XFCE desktop provides a graphical interface for daily use. Learning a handful of basic commands -- ls, cd, pwd, cp, mv, rm, and mkdir -- gives you the foundation to navigate and manage your Linux system.

Next: Learn about shells, the program inside the terminal that actually interprets your commands.

For a comprehensive command reference, see the Termux commands guide.