• Foundation
  • About 15 min
  • 5 practice questions

GUI and CLI: two ways to give commands, on Windows and Linux

Compare graphical and command-line interfaces, use a few basic commands on Linux and Windows, and find the Linux desktop equivalent of familiar Windows features.

If something looks wrong, please tell us.

There are two main ways to tell a computer what to do: point and click on pictures, or type commands. Both are still used every day. Knowing both, and knowing how Windows and Linux name the same things, makes you comfortable on any computer.

Command-line interface (CLI)

In a command-line interface you type a command at a prompt and press Enter; the computer replies in text. Early personal computers ran MS-DOS, a CLI. Today you use a CLI through the Terminal on Linux (running a shell such as bash) or the Command Prompt or PowerShell on Windows. A CLI is fast for experienced users, can repeat a task on many files with one command or a script, and needs few resources, but you must remember the commands and type them exactly.

Graphical user interface (GUI)

In a graphical user interface you work with pictures on the screen using a mouse, touchpad or touch. Its four building blocks are remembered as WIMP: Windows, Icons, Menus and a Pointer. A GUI is easy to learn because you can see your choices, but it needs more memory and processing power. Windows, macOS and Linux desktop environments such as GNOME, KDE Plasma, Xfce and MATE are GUIs.

GUI or CLI?

  • GUI
    • Click, double-click, drag, touch
    • Easy for beginners: choices are visible
    • Slower for repeated tasks
    • Needs more memory and graphics power
    • Windows desktop, GNOME, KDE Plasma
  • CLI
    • Type a command and press Enter
    • Harder: commands must be remembered
    • Faster: one command or script does many
    • Needs very little
    • Linux Terminal, Windows Command Prompt
PointGUICLI
How you give commandsClick, double-click, drag, touchType commands and press Enter
Ease for beginnersEasy: choices are visibleHarder: commands must be remembered
Speed for repeated tasksSlower: one click at a timeFaster: one command or script can do many
Resources neededMore memory and graphics powerVery little
ExamplesWindows desktop, GNOME, KDE PlasmaLinux Terminal, Windows Command Prompt

A few basic commands

TaskLinux terminalWindows Command Prompt
List the files in the current folderlsdir
Change to another foldercd foldernamecd foldername
Show the current folderpwdcd (with nothing after it)
Make a new foldermkdir namemkdir name (or md name)
Copy a filecp source destinationcopy source destination
Move or rename a filemv old newmove (to move), ren (to rename)
Delete a filerm filenamedel filename
Clear the screenclearcls

Linux commands and file names are case-sensitive: ls works but LS usually gives 'command not found'. Windows commands are not case-sensitive.

Linux desktop and Windows equivalents

WindowsLinux desktop (names vary by desktop environment)
Start menuApplications menu, launcher or activities overview
TaskbarPanel or dock
File ExplorerFile manager (for example Files or Dolphin)
Recycle BinTrash
Control Panel or SettingsSystem Settings
Task ManagerSystem Monitor
Command PromptTerminal
Administrator accountroot user; ordinary users run admin tasks with sudo
C: drive/ (the root directory)

Worked example 1: the same task both ways

Task: make a folder called notes and check that it exists. On Linux: type mkdir notes and press Enter, then type ls; notes appears in the list. On Windows: type mkdir notes, then dir. In a GUI on either system: open the file manager, right-click an empty area, choose the New Folder option, type notes and press Enter. Same result, three routes.

Worked example 2: which interface suits whom?

A first-time user who wants to write a letter should use a GUI: everything is visible and needs no memorised commands. A system administrator who must rename 500 log files every night should use a CLI script: one command does all 500 without clicking each file. Neither interface is 'better'; each suits a different job.

GUI = WIMP: Windows, Icons, Menus, Pointer. CLI = type a command, press Enter. Linux: ls, cd, pwd, mkdir, cp, mv, rm. Windows: dir, cd, mkdir, copy, move, del.

Key takeaways: a GUI is easy to learn and visual; a CLI is fast, scriptable and light. Linux commands are case-sensitive. Learn the equivalents: Recycle Bin and Trash, Task Manager and System Monitor, Command Prompt and Terminal, Administrator and root.

Check your understanding

  1. 1. In GUI terms, WIMP stands for:

    1. Windows, Icons, Menus, Pointer
    2. Words, Images, Mouse, Printer
    3. Web, Internet, Mail, Programs
    4. Windows, Internet, Memory, Processor
    Show answer

    Answer: A. A graphical interface is built from windows, icons, menus and a pointer controlled by a mouse, touchpad or touch.

  2. 2. Which Linux command lists the files in the current folder?

    1. cd
    2. pwd
    3. ls
    4. mkdir
    Show answer

    Answer: C. ls lists the contents of the folder. cd changes the folder, pwd shows the current folder's path and mkdir makes a new folder.

  3. 3. Which of these is a feature of a command-line interface rather than a GUI?

    1. You click icons with a mouse
    2. You type commands at a prompt
    3. Programs open in windows with title bars
    4. You drag files from one folder to another
    Show answer

    Answer: B. In a CLI you type commands and press Enter. Clicking icons, windows with title bars and dragging files are all features of a GUI.

  4. 4. What is the Linux desktop equivalent of the Windows Recycle Bin?

    1. Terminal
    2. Panel
    3. Kernel
    4. Trash
    Show answer

    Answer: D. Linux desktops keep deleted files in the Trash until it is emptied, as Windows does with the Recycle Bin. The Terminal is the command line, the panel is like the taskbar, and the kernel is the core of the OS.

  5. 5. On Linux, typing LS instead of ls usually gives an error. Why?

    1. Linux commands are case-sensitive
    2. LS is a Windows command
    3. The keyboard is faulty
    4. Linux does not allow capital letters anywhere
    Show answer

    Answer: A. Linux treats capital and small letters as different, so LS is not the same command as ls. Capital letters are allowed in Linux file names; they simply count as different characters.

Privacy · Terms · Refunds · Delivery