So glad to introduce a guide on command line in github with all linux cmd manual inside! A guide of how to use command line and shell.
Using Command-line searcher, see cmd-searcher
Use Github Codespace to edit and run code and commands in the browser:
Fork this repository(including all branches), and opne in your codespace. Select the repository you just forked, and click on the "Code" button to open the editor. You can use the branch freeCodeSpace to create files and run commands in the terminal.
When you first open a terminal window, you might feel like you are staring into a mysterious black void, waiting for magic to happen. That magic is called the Command Line Interface (CLI). Before colorful windows, buttons, and apps, the CLI was the primary way people used computers. In this essay, we'll dive into the history of the command line, explore how it evolved across different systems, and understand why it still matters today — especially for you, a budding programmer.
At its core, a Command Line Interface is a way for users to interact with a computer by typing text commands. Unlike a Graphical User Interface (GUI), where you click on icons, the CLI demands direct instructions: you type a command, press Enter, and the computer responds.
CLI might feel old-fashioned, but it's extremely powerful and flexible — that's why developers and system administrators still rely on it today.
1950s-1960s — In the earliest days of computers, there were no screens or keyboards. People wrote programs on punch cards — physical pieces of paper with holes representing instructions. They would hand a stack of cards to a computer operator, who would load them into the machine.
This system was called batch processing — running tasks in groups or "batches" without direct human interaction during execution.
Imagine writing all your code on paper, giving it to a machine, and waiting hours just to find out you had a typo!
In the 1960s, computers evolved to allow interactive sessions. The invention of the terminal changed everything. Instead of punch cards, users could type commands directly into a machine using a keyboard, and see output on a simple screen or printer.
One of the first popular operating systems to use a command-line approach was UNIX.
UNIX was created in 1969 at AT&T Bell Labs.
It introduced powerful CLI concepts like:
Shells: Programs that interpret your commands.
Pipelines: Connecting commands together.
UNIX’s approach set the foundation for nearly all modern CLI systems.
The shell is a program that reads your typed commands, runs them, and shows the results.
Some important shells in history:
sh (Bourne Shell): The original UNIX shell, created in the 1970s.
csh (C Shell): Introduced programming-like features like if statements.
bash (Bourne Again SHell): The most popular shell today on Linux and macOS.
Each shell made it easier and more powerful for users to script and automate tasks.
Today, when you open Terminal on a Mac or Linux machine, you are usually interacting with bash or its newer cousin zsh (Z Shell).
Command Line in Different Systems Now let's look at how different major systems approached the command line.
UNIX was the father of CLI-based systems.
Linux, created by Linus Torvalds in 1991, was inspired by UNIX.
Linux distributions (Ubuntu, Fedora, Arch) rely heavily on the CLI for system administration.
Linux introduced the philosophy: "small tools that do one thing well" — you can chain simple commands to do complex tasks.
Example of a simple Linux command:
ls -laThis lists all files in the directory in a detailed (long) format.
MS-DOS and Windows Command Prompt In 1981, MS-DOS (Microsoft Disk Operating System) was released.
It was the first widespread command-line interface for personal computers.
Commands were simpler compared to UNIX.
Example MS-DOS command:
dirThis lists files in the directory, similar to ls in UNIX.
Later, Microsoft introduced Windows with a GUI, but still kept Command Prompt (cmd.exe) for advanced users.
Today, Windows includes PowerShell, a more powerful CLI with scripting capabilities, merging ideas from UNIX and DOS.
macOS (formerly Mac OS X) is based on a UNIX-like system called Darwin.
The terminal in macOS allows you to use bash, zsh, and other UNIX-style tools.
Many developers use Mac terminals because of their close relationship to Linux environments.
Fun fact: When you use macOS Terminal, you are actually using UNIX at heart!
You might wonder: why bother learning the CLI when we have beautiful graphical interfaces?
Here’s why:
Speed: Typing a command can be faster than clicking through menus.
Automation: You can write scripts to handle repetitive tasks.
Remote Work: Managing servers (like websites) usually requires CLI skills.
Power and Flexibility: CLI gives you access to deep system settings and advanced features.
If you want to become a serious developer, system administrator, or tech wizard, knowing the command line is a must.
Modern CLI Tools You Should Know Today’s command-line world is even more exciting! Here are tools you should check out:
git: Version control system.
docker: Manage containers.
npm/yarn: Install JavaScript packages.
curl/wget: Download files from the internet.
htop: Better task manager in the terminal.
vim/nano: Text editors inside the CLI.
You don’t need to learn them all at once. Start small — learn one command a day!
The command line has come a long way — from punch cards to interactive shells to powerful tools managing entire cloud systems. Each operating system — UNIX, Linux, Windows, macOS — built its own relationship with the command line, but the heart remains the same: typing text to tell a computer what to do.
As a programmer, don't be scared of the CLI. See it as a superpower waiting for you to unlock.
Every great developer started somewhere — maybe with their first humble ls or dir command. So open that terminal, type a command, and step into a world where you talk directly to your computer.
Quick Tips for Beginners Use man (manual) pages. Example:
man lsThis shows help for the ls command.
Practice basic navigation:
cd: change directory
pwd: print working directory
mkdir: make new folder
Make mistakes! It's part of the learning journey.
Happy coding!
Make sure you have a command line tool installed on your computer, such as Windows Command Prompt, PowerShell, or the Linux terminal.
If you are using Windows, you can download and install the Windows Subsystem for Linux (WSL) to run Linux commands on Windows.
All the commands in this guide are written for shell.
If your are using windows, Win(Command) + R, then type cmd to open command line tools.
Type sh to run the shell for your environment.
Inside, you can type commands and run them. All the commands can be seen in official documentation or pages or in the linux section in this library.
try to get help in command line by typing some-command --help
If you are using linux, you can open the terminal by pressing Ctrl + Alt + T.
Inside, you can type commands and run them. All the commands can be seen in official documentation or pages or in the windows section in this library.
try to get help in command line by typing man some-command
https://github.com/jlevy/the-art-of-command-line
https://missing.csail.mit.edu/2020/
Contributions are always welcome! Please create a pull request to contribute.
Discussion forums is already opened, feel free to ask your doubts or give your suggestions.
Contributions of all types are more than welcome; if you are interested in contributing code, feel free to check out our GitHub Issues , Projects and Create a pull request to contribute.
Principal Maintainers: @LouisCaiKM7