0Pricing
Linux Server Deployment & SSH Mastery · Lesson

Mastering Basic CLI Commands

Explore fundamental Linux commands for interacting with your server, including `ls`, `cd`, `pwd`, `mkdir`, and `rm`.

Mastering Basic CLI Commands is a free Linux Server Deployment & SSH Mastery lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Linux Server Deployment & SSH Mastery learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Your Linux Command Toolkit

Time to build your command toolkit — the core commands for navigating and managing files. The CLI lets you talk to your system directly in text.

Finding Your Current Location

pwd (print working directory) tells you exactly where you are in the filesystem. You always start somewhere, usually your home directory.

pwd

Listing Directory Contents

ls lists the files and folders in your current location — like opening a folder to see what's inside.

ls

Getting More Info with `ls`

ls has handy flags: -l for detailed long format, -a to reveal hidden dotfiles. Combine them as ls -la.

ls -l

Changing Your Directory

cd (change directory) moves you around. Give it an absolute path from root, like cd /var/log, to jump straight there.

cd /var/log

Smart Navigation with `cd`

cd also takes relative shortcuts: .. goes up a level, ~ jumps home, and - returns to where you just were.

cd ..

Creating New Directories

Need a new folder? mkdir (make directory) creates one in your current location, or wherever you point it.

mkdir my_new_project

Deleting Files (Carefully!)

rm deletes files — and there's no recycle bin, so deleted means gone. Double-check before you hit Enter.

rm unwanted_file.txt

Removing Directories

rmdir removes empty directories. For one with contents, use rm -r to delete it recursively — and treat rm -rf with real caution.

rm -r old_project_folder

Command Line Challenge

Let's test your knowledge of basic CLI commands!

Key CLI Commands Recap

Toolkit unlocked! pwd, ls, cd, mkdir, and rm are your foundation for moving around and managing any Linux system.

Frequently asked questions

Is the “Mastering Basic CLI Commands” lesson free?

Yes — the full text of “Mastering Basic CLI Commands” is free to read here on the web, and the Linux Server Deployment & SSH Mastery course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Linux Server Deployment & SSH Mastery course, upgrade to CoddyKit PRO.

What will I learn in “Mastering Basic CLI Commands”?

Explore fundamental Linux commands for interacting with your server, including `ls`, `cd`, `pwd`, `mkdir`, and `rm`. You practise Linux Server Deployment & SSH Mastery with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Linux Server Deployment & SSH Mastery?

No prior experience is required. Linux Server Deployment & SSH Mastery on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Mastering Basic CLI Commands” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Linux Server Deployment & SSH Mastery lesson?

Yes. Every Linux Server Deployment & SSH Mastery lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Introduction to Linux Servers
  2. Mastering Basic CLI Commands
  3. File System & Permissions Essentials
  4. Working with Text: Viewing, Searching, and Piping
← Back to Linux Server Deployment & SSH Mastery