Today we started from the very beginning: What is a computer, how does it work, what is hardware, what is software, what is an operating system, and how do we communicate with a computer through Terminal?
The most important idea from today is this:
YOU
↓
give instructions
↓
COMPUTER
↓
executes instructions
↓
RESULT
A computer does not guess what you mean. It follows the instructions you give it.
That is why, when we work in DevOps, our commands and scripts need to be clear and correct.
1. Hardware
Hardware means the physical parts of a computer.
These are things you can physically touch.
Examples:
CPU
RAM
SSD / HDD
Motherboard
Network Card
Keyboard
Mouse
Monitor
GPU
CPU
CPU means:
Central Processing Unit
You can think of the CPU as the part of the computer that processes instructions and performs calculations.
For example:
You click something
↓
Software gives instructions
↓
CPU processes instructions
↓
You get a result
2. RAM
RAM means:
Random Access Memory
RAM is temporary working memory.
Imagine you open:
Chrome
Zoom
VS Code
Slack
While those applications are running, the computer needs temporary memory to work with them.
That is RAM.
Simple example:
RAM = your working desk
The bigger your desk is, the more things you can work with at the same time.
When you restart or shut down the computer, the temporary information in RAM disappears.
3. Storage — SSD / HDD
Storage keeps information for a longer time.
Examples:
Photos
Documents
Videos
Applications
Operating System
Code
Today most computers use:
SSD
Older computers commonly used:
HDD
Simple comparison:
RAM = temporary
SSD/HDD = permanent storage
4. Software
Software means programs and instructions that tell the computer what to do.
Examples:
Chrome
Zoom
Microsoft Word
Slack
VS Code
Docker
Git
Jenkins
A very simple way to remember:
Hardware = physical computer
Software = instructions/programs
5. Operating System
One very important type of software is the Operating System.
Examples:
Windows
macOS
Linux
The operating system manages the computer's resources.
For example:
CPU
RAM
Disk
Network
Processes
Devices
Applications normally do not directly control all of the hardware themselves.
A simplified picture is:
USER
↓
APPLICATION
↓
OPERATING SYSTEM
↓
KERNEL
↓
HARDWARE
6. What is Kernel?
The Kernel is the core part of the operating system.
It helps manage things such as:
CPU
Memory
Processes
Disk
Network
Devices
Simplified:
Applications
↓
Operating System
↓
Kernel
↓
CPU / RAM / Disk / Network
One important fact:
Linux is technically a kernel.
Ubuntu, Debian, Red Hat and others build complete operating-system environments around the Linux kernel.
We will talk much more about this later.
7. Why do DevOps Engineers learn Linux?
A large amount of infrastructure and many servers run Linux.
As DevOps engineers, we will eventually work with technologies such as:
AWS
Docker
Kubernetes
Jenkins
Terraform
Ansible
Git
Nginx
Linux knowledge is therefore one of our foundations.
Today we started learning how to communicate with an operating system using the Terminal.
8. What is Terminal?
Terminal is an application where we can give instructions to our computer by typing commands.
Instead of clicking:
Finder
→ Documents
→ Folder
→ File
we can tell the computer what we want using commands.
For example:
pwd
ls
cd Documents
This is called using the Command Line Interface — CLI.
You will hear this term many times:
CLI = Command Line Interface
9. Important: The Terminal Prompt
On Mac you may see something like:
aisalkyn@MacBook-Air ~ %
The % is the Terminal prompt.
You do not type the % when I give you commands.
For example, if your screen shows:
aisalkyn@MacBook-Air ~ %
and I give you:
pwd
you only type:
pwd
and press Enter.
10. First Command — whoami
Run:
whoami
whoami asks:
Which user am I currently using?
Example output:
aisalkyn
It means you are currently logged in as that user.
Remember:
whoami = who am I?
11. pwd — Where Am I?
Run:
pwd
PWD means:
Print Working Directory
This command tells you where you currently are in the filesystem.
Example:
/Users/aisalkyn
Think about it like GPS.
If you are lost, run:
pwd
You are asking:
Computer, where am I?
12. ls — What Is Here?
Run:
ls
ls means list.
It shows files and directories inside your current location.
Example:
Applications
Desktop
Documents
Downloads
Library
Movies
Pictures
Think:
pwd = Where am I?
ls = What is here?
13. ls -l — Detailed List
Run:
ls -l
This gives more information about files and directories.
You may see something like:
drwxr-xr-x 5 user staff 160 Sep 1 Documents
-rw-r--r-- 1 user staff 200 Sep 1 hello.txt
Don't worry about understanding all of this today.
Later we will learn:
permissions
owner
group
file size
date
For now remember:
ls
Simple list.
ls -l
Detailed list.
14. What Is a Directory?
A directory is basically what you normally call a folder.
These two words are commonly used:
Folder
Directory
In Linux and DevOps you will hear directory very often.
Example:
Downloads
Documents
Desktop
These are directories.
15. cd — Change Directory
cd means:
Change Directory
It allows us to move from one directory to another.
For example:
cd Downloads
Now check:
pwd
You may see:
/Users/yourname/Downloads
You moved from:
/Users/yourname
to:
/Users/yourname/Downloads
16. cd .. — Go Back One Level
Run:
cd ..
The two dots:
..
mean:
parent directory
or simply:
Go one directory back/up.
Example:
/Users/student/Downloads
Run:
cd ..
Now:
/Users/student
17. ~ — Your Home Directory
This symbol:
~
represents your home directory.
For example:
cd ~
takes you home.
Then run:
pwd
You may see:
/Users/student
Therefore:
cd ~
means:
Take me to my home directory.
18. A Useful Shortcut
Instead of:
cd Downloads
you can write:
cd ~/Downloads
This means:
Go to my home directory
then
go to Downloads
19. mkdir — Create a Directory
mkdir means:
Make Directory
Let's create our first DevOps directory.
Run:
mkdir devops
Now check:
ls
You should see:
devops
Congratulations — you created a directory using the command line.
20. Enter the Directory
Run:
cd devops
Now check where you are:
pwd
You should see something similar to:
/Users/yourname/devops
21. touch — Create a File
Let's create our first file.
Run:
touch day1.txt
Now:
ls
You should see:
day1.txt
We created an empty file.
22. cat — Read a File
Run:
cat day1.txt
Nothing may appear because the file is currently empty.
cat can be used to display the contents of a file.
Remember:
cat = show me what is inside this file
23. echo — Print Text
Run:
echo "Hello DevOps"
You should see:
Hello DevOps
The computer printed the text back to you.
24. Put Text Into a File
Now run:
echo "Hello DevOps" > day1.txt
We are telling the computer:
Take:
Hello DevOps
and put it into:
day1.txt
Now read the file:
cat day1.txt
You should see:
Hello DevOps
25. What Does > Mean?
This symbol:
>
is called redirection.
For now, understand it simply as:
Send this output into this file.
Example:
echo "I am learning DevOps" > student.txt
Then:
cat student.txt
Output:
I am learning DevOps
We will learn redirection in much more detail later.
26. cp — Copy
cp means:
copy
Create a file:
touch engineer.txt
Copy it:
cp engineer.txt engineer-backup.txt
Now:
ls
You should see:
engineer.txt
engineer-backup.txt
The original file still exists.
We created a copy.
27. mv — Move or Rename
mv means:
move
but it can also be used to rename something.
Example:
mv engineer.txt devops-engineer.txt
Now run:
ls
Instead of:
engineer.txt
you should see:
devops-engineer.txt
We renamed the file.
28. Move a File Into Another Directory
Create directories:
mkdir developers
mkdir devops-team
Create a file:
touch employee.txt
Move the file:
mv employee.txt devops-team/
Now check:
ls
The file disappeared from the current directory because we moved it.
Check inside:
ls devops-team
You should see:
employee.txt
29. rm — Delete a File
rm means:
remove
Create a test file:
touch delete-me.txt
Check:
ls
Now delete it:
rm delete-me.txt
Check again:
ls
The file is gone.
⚠️ Be careful with rm.
Terminal does not always behave like Finder with a Trash folder.
Do not randomly use commands like:
rm -rf
You will learn that command later when you understand exactly what it does.
30. Our Main Commands From Today
Keep this cheat sheet:
whoami Who am I?
pwd Where am I?
ls What is here?
ls -l Show detailed information
cd Change directory
cd .. Go back one directory
cd ~ Go to home directory
mkdir Create directory
touch Create file
echo Print/write text
cat Read file
cp Copy file
mv Move or rename
rm Remove file
31. Think of Commands Like English Instructions
This was the idea behind our game today.
You told the "computer":
Stand up
Turn right
Walk
Stop
Pick something up
Terminal is the same idea.
Instead of:
Create a folder.
we say:
mkdir folder
Instead of:
Go inside the folder.
we say:
cd folder
Instead of:
Tell me where I am.
we say:
pwd
Instead of:
Show me what is here.
we say:
ls
This is why learning commands becomes easier when you understand what you're asking the computer to do.
32. Practice Lab — Do This at Home
Open Terminal.
First go home:
cd ~
Check:
pwd
Create a practice directory:
mkdir devops-practice
Enter it:
cd devops-practice
Check:
pwd
Create three directories:
mkdir developers
mkdir devops
mkdir managers
Check:
ls
You should see:
developers
devops
managers
Enter DevOps:
cd devops
Create a file:
touch student.txt
Add text:
echo "I am learning DevOps" > student.txt
Read it:
cat student.txt
Copy it:
cp student.txt student-backup.txt
Check:
ls
Rename it:
mv student.txt devops-engineer.txt
Check:
ls
Delete the backup:
rm student-backup.txt
Check again:
ls
Go back:
cd ..
Check:
pwd
Then:
ls
33. Final Structure
If everything worked, you should have something similar to:
devops-practice/
│
├── developers/
│
├── devops/
│ └── devops-engineer.txt
│
└── managers/
And inside:
devops-engineer.txt
you should have:
I am learning DevOps
34. Challenge — Don't Look at the Answers First
Try this by yourself:
Create a directory called:
company
Inside company, create:
frontend
backend
devops
Inside devops, create:
engineer.txt
Put this text inside:
I want to become a DevOps Engineer
Then:
- Display the contents of the file.
- Make a copy called
engineer-backup.txt. - Rename
engineer.txttosenior-devops.txt. - Delete the backup.
- Show all remaining files.
The commands you will need are:
mkdir
cd
pwd
ls
touch
echo
cat
cp
mv
rm
Try to solve it without looking at today's examples first.
35. Important Mac Issue We Saw Today
Some students using macOS received:
ls: .: Operation not permitted
For example:
cd ~/Downloads
ls
and macOS blocked access.
This does not necessarily mean your ls command is wrong.
macOS has privacy protections that may prevent Terminal from reading folders such as:
Downloads
Documents
Desktop
If this happens, go to:
System Settings
→ Privacy & Security
→ Files and Folders
Look for Terminal and allow access.
If Terminal is not listed or the problem continues, check:
System Settings
→ Privacy & Security
→ Full Disk Access
Add/enable:
Terminal.app
Then completely quit Terminal:
Command + Q
Open Terminal again and retry:
cd ~/Downloads
ls
This was actually our first real troubleshooting example.
The command was correct, but the operating system's security settings prevented the command from accessing the folder.
36. Most Important Lesson From Day 1
Do not memorize commands without understanding them.
Before typing anything, ask yourself:
Where am I?
Where do I want to go?
What do I want the computer to do?
What result am I expecting?
Then choose the command.
Today:
Human instruction
↓
Computer instruction
↓
Linux/Unix command
↓
Result
Later we will go from individual commands to:
Commands
↓
Scripts
↓
Automation
↓
CI/CD
↓
Cloud
↓
Docker
↓
Kubernetes
↓
Production
But everything starts with the same principle we learned in our game:
Give the computer clear instructions, understand what those instructions do, and verify the result.
Homework
Repeat the commands from today at least 2–3 times. Do not simply copy and paste everything. Type the commands yourself so your hands and brain start remembering them.
Tomorrow, before class, you should be comfortable answering:
What is hardware?
What is software?
What is an operating system?
What is a kernel?
What is Terminal?
What does pwd do?
What does ls do?
What does cd do?
What does mkdir do?
What does touch do?
What does cat do?
What does cp do?
What does mv do?
What does rm do?
If you can explain these in your own words and complete the practice lab without looking at the answers, Day 1 is complete.
Top comments (0)