Ethernet Labs

Ethernet Labs

Share this post

Ethernet Labs
Ethernet Labs
Linux 101 (Part 1): Introduction
User's avatar
Discover more from Ethernet Labs
Your blueprint for mastering network architecture. In-depth technical content and practical labs that bridge theory with real-world implementation designed for every stage of your networking career.
Already have an account? Sign in

Linux 101 (Part 1): Introduction

Learn Linux CLI the Right Way

Ethernet Labs's avatar
Karam Al Shukur's avatar
Ethernet Labs
and
Karam Al Shukur
Apr 05, 2025
2

Share this post

Ethernet Labs
Ethernet Labs
Linux 101 (Part 1): Introduction
1
Share

Objective

Welcome to "Linux 101," a comprehensive series designed to transform beginners into confident Linux command line users. In today's digital infrastructure, Linux powers everything from web servers and cloud platforms to network devices and security systems, making command line proficiency an essential skill for IT every professionals.

The command line interface (CLI) is the heart of Linux systems. While graphical interfaces offer convenience, the CLI provides unparalleled power, efficiency, and automation capabilities that are critical for:

Ethernet Labs is reader-supported. To receive new posts and support my work, consider becoming a free or paid subscriber.

  • Network engineers

  • System administrators

  • Security professionals

  • DevOps engineers

  • Cloud specialists


Your First Linux Commands

One of the primary motivations for someone to transition to Linux is to take advantage of what is arguably its most powerful feature: the terminal!

At one point, the entire Linux operating system operated solely through the terminal, but today, numerous graphical tools have been created, leading to the development of stunning desktop environments like Ubuntu.

Fundamentally the main difference between using the terminal and using normal graphical methods that you probably already familiar with from using Windows or MAC, instead of pointing and clicking with mouse to control your computer, you will be typing commands with keyboard instead.

Linux is unique and the development of Linux is closely tied to the terminal and this means knowing how to use the terminal gives you pretty much absolute control of how your computer works, by using the terminal you can do pretty much anything you want with your Linux computer that you cannot get this level of control of any other operating system, making mastering the terminal an invaluable skill.

Let's open the terminal and begin typing some commands to see their effects! The goal here is simply to get familiar with the interface, understand what the terminal looks like, and see how it responds to our commands. From there, we can proceed further.

“CTRL+ALT+T “ this is the shortcut you will use to open the terminal on your ubuntu machine

Everything in Linux is case sensitive, so pay extra attention when you are typing any command

Let’s start with fun command, “echo”

The “echo” command just print on the screen what you give it as an input!

root@vps004:~# echo Hello World!
Hello World!
root@vps004:~# echo Hellooooooo
Hellooooooo
root@vps004:~# 

let’s try now with another command called “cal”

The “cal” command is going to show you a calendar on the screen!

root@vps004:~# cal
     April 2025       
Su Mo Tu We Th Fr Sa  
       1  2  3  4  5  
 6  7  8  9 10 11 12  
13 14 15 16 17 18 19  
20 21 22 23 24 25 26  
27 28 29 30           

This is just the default behavior of the “cal” command, prints calendar of the current month, with todays date highlighted, however what make Linux commands interesting is that you can customize the behavior of commands to do what you want them to do.

for example, let’s say we want to see the calendar not just for the current month, but for the current year! so our command now will be “cal 2025”


root@vps004:~# cal 2025
                            2025
      January               February               March          
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
          1  2  3  4                     1                     1  
 5  6  7  8  9 10 11   2  3  4  5  6  7  8   2  3  4  5  6  7  8  
12 13 14 15 16 17 18   9 10 11 12 13 14 15   9 10 11 12 13 14 15  
19 20 21 22 23 24 25  16 17 18 19 20 21 22  16 17 18 19 20 21 22  
26 27 28 29 30 31     23 24 25 26 27 28     23 24 25 26 27 28 29  
                                            30 31                 

       April                  May                   June          
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
       1  2  3  4  5               1  2  3   1  2  3  4  5  6  7  
 6  7  8  9 10 11 12   4  5  6  7  8  9 10   8  9 10 11 12 13 14  
13 14 15 16 17 18 19  11 12 13 14 15 16 17  15 16 17 18 19 20 21  
20 21 22 23 24 25 26  18 19 20 21 22 23 24  22 23 24 25 26 27 28  
27 28 29 30           25 26 27 28 29 30 31  29 30                 
                                                                  

        July                 August              September        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
       1  2  3  4  5                  1  2      1  2  3  4  5  6  
 6  7  8  9 10 11 12   3  4  5  6  7  8  9   7  8  9 10 11 12 13  
13 14 15 16 17 18 19  10 11 12 13 14 15 16  14 15 16 17 18 19 20  
20 21 22 23 24 25 26  17 18 19 20 21 22 23  21 22 23 24 25 26 27  
27 28 29 30 31        24 25 26 27 28 29 30  28 29 30              
                      31                                          

      October               November              December        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
          1  2  3  4                     1      1  2  3  4  5  6  
 5  6  7  8  9 10 11   2  3  4  5  6  7  8   7  8  9 10 11 12 13  
12 13 14 15 16 17 18   9 10 11 12 13 14 15  14 15 16 17 18 19 20  
19 20 21 22 23 24 25  16 17 18 19 20 21 22  21 22 23 24 25 26 27  
26 27 28 29 30 31     23 24 25 26 27 28 29  28 29 30 31           
                      30                                          

Also, we can give our commands something called “an option” which is something allow you to customize the behavior of the command. So instead of typing “cal 2025” we can add the option “-y” to the command which achieve the same thing, printing the entire current year on the screen.

root@vps004:~# cal -y
                            2025
      January               February               March          
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
          1  2  3  4                     1                     1  
 5  6  7  8  9 10 11   2  3  4  5  6  7  8   2  3  4  5  6  7  8  
12 13 14 15 16 17 18   9 10 11 12 13 14 15   9 10 11 12 13 14 15  
19 20 21 22 23 24 25  16 17 18 19 20 21 22  16 17 18 19 20 21 22  
26 27 28 29 30 31     23 24 25 26 27 28     23 24 25 26 27 28 29  
                                            30 31                 

       April                  May                   June          
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
       1  2  3  4  5               1  2  3   1  2  3  4  5  6  7  
 6  7  8  9 10 11 12   4  5  6  7  8  9 10   8  9 10 11 12 13 14  
13 14 15 16 17 18 19  11 12 13 14 15 16 17  15 16 17 18 19 20 21  
20 21 22 23 24 25 26  18 19 20 21 22 23 24  22 23 24 25 26 27 28  
27 28 29 30           25 26 27 28 29 30 31  29 30                 
                                                                  

        July                 August              September        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
       1  2  3  4  5                  1  2      1  2  3  4  5  6  
 6  7  8  9 10 11 12   3  4  5  6  7  8  9   7  8  9 10 11 12 13  
13 14 15 16 17 18 19  10 11 12 13 14 15 16  14 15 16 17 18 19 20  
20 21 22 23 24 25 26  17 18 19 20 21 22 23  21 22 23 24 25 26 27  
27 28 29 30 31        24 25 26 27 28 29 30  28 29 30              
                      31                                          

      October               November              December        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
          1  2  3  4                     1      1  2  3  4  5  6  
 5  6  7  8  9 10 11   2  3  4  5  6  7  8   7  8  9 10 11 12 13  
12 13 14 15 16 17 18   9 10 11 12 13 14 15  14 15 16 17 18 19 20  
19 20 21 22 23 24 25  16 17 18 19 20 21 22  21 22 23 24 25 26 27  
26 27 28 29 30 31     23 24 25 26 27 28 29  28 29 30 31           
                      30                                          

To summarize, you can customize the behavior of commands using:

  • input —> cal 2025

  • option —> cal -y

we will be going into more depth about command “inputs” and “options” in a lot more detail, but we are going to save this for later. As for now we are just experiencing the CLI, typing some basic commands and get comfortable with the terminal.

The “date” command is straightforward to check today’s date!

root@vps004:~# date
Sat 05 Apr 2025 02:35:19 PM UTC

The “clear” command

this command simply clear your terminal by removing all the previous text from the screen, there is keyboard shortcut for it “CTRL+L”

If you press the up arrow key, you will see the most recent command you have typed, keep pressing that for older commands.

you can also look at your whole command history using “history” command

root@vps004:~# history
    1  history
    2  clear
    3  shell
    4  clear
    5  echo $PATH
    6  efiwefjowe
    7  clear
    8  ech $PATH
    9  echo $PATH
   10  which echo
   11  cd /usr/bin/
   12  ls
   13  cd 
   14  ls -la
   15  cd /usr/bin/
   16  ls
   17  cd echo
   18  cat echo 
   19  clear
   20  cd ..
   21  exit
   22  history
   23  which cal
   24  cd /usr/bin
   25  ls
   26  cd root
   27  cd ..
   28  ls
   29  which which
   30  date
   31  clear
   32  cal 8 2020
   33  cal 12 2020
   34  cal 2 2026
   35  cal march 2020
   36  clear
   37  date
   38  date -u
   39  cal dec 2020
   40  cal -A 1 dec 2020
   41  cal -A 3 dec 2020

we can see all the previous commands that I have typed in my terminal, even if the command was wrong it will be saved here in the history, with each command you can see a “line number” associated with it.

for example, we can see the line number = 37 " for the date command, let’s say I want to run the “date” command again, instead of cycling all the way back to “date” command using the up arrow key, I can do this instead “! + line number”:

root@vps004:~# !37
date
Sat 05 Apr 2025 02:47:29 PM UTC

and if you just want to run the most recent command you have typed you can use “!!”

root@vps004:~# !!
date
Sat 05 Apr 2025 02:49:35 PM UTC

since that last command I used was the “date” command, when I typed “!!” I got the same result, printing the today’s date on the screen.

sometimes this history file that stores your commands can get quite long, so if you want to clear the history, it’s kind of tow step process “history -c ; history -w” and what this does, is the “-c” opting clears the history while the “-w” option write those changes:

root@vps004:~# history -c ; history -w
root@vps004:~# history
    1  history
root@vps004:~# 

finally to close the terminal, you can use the “exit” command or use the keyboard shortcut of “CTRL+ALT+D”

Summary

The use case of the commands we discussed earlier may not be entirely clear at this moment, and that’s perfectly fine. Our goal in this section wasn't to learn all the available commands at once; rather, we aimed to simply enter our initial commands in the terminal and observe the results on our screen.

All commands in the Linux CLI share a somewhat similar structure, and grasping that structure is a crucial step towards mastering the CLI and harnessing the power of the terminal. In the next section, we will explore how Linux commands are structured, which serves as a vital foundation step for everything we'll learn moving forward. If you have previously used Linux but never felt confident in your understanding, or if you're new to Linux, then the next section is an excellent place to start.

Thanks for reading Ethernet Labs! This post is public so feel free to share it.

Share

Leave a comment

Ethernet Labs is reader-supported. To receive new posts and support my work, consider becoming a free or paid subscriber.

Karam Al Shukur's avatar
Collins's avatar
Ethernet Labs's avatar
2 Likes∙
1 Restack
2

Share this post

Ethernet Labs
Ethernet Labs
Linux 101 (Part 1): Introduction
1
Share

Discussion about this post

User's avatar
Terraform Essentials: A Network Engineer's Guide to IaC
How Infrastructure as Code Simplifies Multi-Cloud and On-Prem Networking
Feb 26 • 
Karam Al Shukur
2

Share this post

Ethernet Labs
Ethernet Labs
Terraform Essentials: A Network Engineer's Guide to IaC
SONiC: The 900k$ Ethernet Switch Killer
From Servers to Switches: How Open Source Finally Conquered Networking
Mar 4 • 
Karam Al Shukur
3

Share this post

Ethernet Labs
Ethernet Labs
SONiC: The 900k$ Ethernet Switch Killer
Linux 101 (Part 2): Shell & Command Structure
Part 2 : Linux Shell & Command Structure
Apr 7 • 
Ethernet Labs
 and 
Karam Al Shukur
1

Share this post

Ethernet Labs
Ethernet Labs
Linux 101 (Part 2): Shell & Command Structure

Ready for more?

© 2025 Ethernet Labs
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Create your profile

User's avatar

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.