DEV Community

Aisalkyn Aidarova
Aisalkyn Aidarova

Posted on

DevOps + AI — Day 1 Notes

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

CPU

CPU means:

Central Processing Unit
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

2. RAM

RAM means:

Random Access Memory
Enter fullscreen mode Exit fullscreen mode

RAM is temporary working memory.

Imagine you open:

Chrome
Zoom
VS Code
Slack
Enter fullscreen mode Exit fullscreen mode

While those applications are running, the computer needs temporary memory to work with them.

That is RAM.

Simple example:

RAM = your working desk
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Today most computers use:

SSD
Enter fullscreen mode Exit fullscreen mode

Older computers commonly used:

HDD
Enter fullscreen mode Exit fullscreen mode

Simple comparison:

RAM = temporary

SSD/HDD = permanent storage
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

A very simple way to remember:

Hardware = physical computer

Software = instructions/programs
Enter fullscreen mode Exit fullscreen mode

5. Operating System

One very important type of software is the Operating System.

Examples:

Windows
macOS
Linux
Enter fullscreen mode Exit fullscreen mode

The operating system manages the computer's resources.

For example:

CPU
RAM
Disk
Network
Processes
Devices
Enter fullscreen mode Exit fullscreen mode

Applications normally do not directly control all of the hardware themselves.

A simplified picture is:

USER
 ↓
APPLICATION
 ↓
OPERATING SYSTEM
 ↓
KERNEL
 ↓
HARDWARE
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Simplified:

Applications
      ↓
Operating System
      ↓
Kernel
      ↓
CPU / RAM / Disk / Network
Enter fullscreen mode Exit fullscreen mode

One important fact:

Linux is technically a kernel.
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

we can tell the computer what we want using commands.

For example:

pwd
Enter fullscreen mode Exit fullscreen mode
ls
Enter fullscreen mode Exit fullscreen mode
cd Documents
Enter fullscreen mode Exit fullscreen mode

This is called using the Command Line Interface — CLI.

You will hear this term many times:

CLI = Command Line Interface
Enter fullscreen mode Exit fullscreen mode

9. Important: The Terminal Prompt

On Mac you may see something like:

aisalkyn@MacBook-Air ~ %
Enter fullscreen mode Exit fullscreen mode

The % is the Terminal prompt.

You do not type the % when I give you commands.

For example, if your screen shows:

aisalkyn@MacBook-Air ~ %
Enter fullscreen mode Exit fullscreen mode

and I give you:

pwd
Enter fullscreen mode Exit fullscreen mode

you only type:

pwd
Enter fullscreen mode Exit fullscreen mode

and press Enter.


10. First Command — whoami

Run:

whoami
Enter fullscreen mode Exit fullscreen mode

whoami asks:

Which user am I currently using?

Example output:

aisalkyn
Enter fullscreen mode Exit fullscreen mode

It means you are currently logged in as that user.

Remember:

whoami = who am I?
Enter fullscreen mode Exit fullscreen mode

11. pwd — Where Am I?

Run:

pwd
Enter fullscreen mode Exit fullscreen mode

PWD means:

Print Working Directory
Enter fullscreen mode Exit fullscreen mode

This command tells you where you currently are in the filesystem.

Example:

/Users/aisalkyn
Enter fullscreen mode Exit fullscreen mode

Think about it like GPS.

If you are lost, run:

pwd
Enter fullscreen mode Exit fullscreen mode

You are asking:

Computer, where am I?


12. ls — What Is Here?

Run:

ls
Enter fullscreen mode Exit fullscreen mode

ls means list.

It shows files and directories inside your current location.

Example:

Applications
Desktop
Documents
Downloads
Library
Movies
Pictures
Enter fullscreen mode Exit fullscreen mode

Think:

pwd = Where am I?

ls = What is here?
Enter fullscreen mode Exit fullscreen mode

13. ls -l — Detailed List

Run:

ls -l
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Don't worry about understanding all of this today.

Later we will learn:

permissions
owner
group
file size
date
Enter fullscreen mode Exit fullscreen mode

For now remember:

ls
Enter fullscreen mode Exit fullscreen mode

Simple list.

ls -l
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

In Linux and DevOps you will hear directory very often.

Example:

Downloads
Documents
Desktop
Enter fullscreen mode Exit fullscreen mode

These are directories.


15. cd — Change Directory

cd means:

Change Directory
Enter fullscreen mode Exit fullscreen mode

It allows us to move from one directory to another.

For example:

cd Downloads
Enter fullscreen mode Exit fullscreen mode

Now check:

pwd
Enter fullscreen mode Exit fullscreen mode

You may see:

/Users/yourname/Downloads
Enter fullscreen mode Exit fullscreen mode

You moved from:

/Users/yourname
Enter fullscreen mode Exit fullscreen mode

to:

/Users/yourname/Downloads
Enter fullscreen mode Exit fullscreen mode

16. cd .. — Go Back One Level

Run:

cd ..
Enter fullscreen mode Exit fullscreen mode

The two dots:

..
Enter fullscreen mode Exit fullscreen mode

mean:

parent directory
Enter fullscreen mode Exit fullscreen mode

or simply:

Go one directory back/up.

Example:

/Users/student/Downloads
Enter fullscreen mode Exit fullscreen mode

Run:

cd ..
Enter fullscreen mode Exit fullscreen mode

Now:

/Users/student
Enter fullscreen mode Exit fullscreen mode

17. ~ — Your Home Directory

This symbol:

~
Enter fullscreen mode Exit fullscreen mode

represents your home directory.

For example:

cd ~
Enter fullscreen mode Exit fullscreen mode

takes you home.

Then run:

pwd
Enter fullscreen mode Exit fullscreen mode

You may see:

/Users/student
Enter fullscreen mode Exit fullscreen mode

Therefore:

cd ~
Enter fullscreen mode Exit fullscreen mode

means:

Take me to my home directory.


18. A Useful Shortcut

Instead of:

cd Downloads
Enter fullscreen mode Exit fullscreen mode

you can write:

cd ~/Downloads
Enter fullscreen mode Exit fullscreen mode

This means:

Go to my home directory
then
go to Downloads
Enter fullscreen mode Exit fullscreen mode

19. mkdir — Create a Directory

mkdir means:

Make Directory
Enter fullscreen mode Exit fullscreen mode

Let's create our first DevOps directory.

Run:

mkdir devops
Enter fullscreen mode Exit fullscreen mode

Now check:

ls
Enter fullscreen mode Exit fullscreen mode

You should see:

devops
Enter fullscreen mode Exit fullscreen mode

Congratulations — you created a directory using the command line.


20. Enter the Directory

Run:

cd devops
Enter fullscreen mode Exit fullscreen mode

Now check where you are:

pwd
Enter fullscreen mode Exit fullscreen mode

You should see something similar to:

/Users/yourname/devops
Enter fullscreen mode Exit fullscreen mode

21. touch — Create a File

Let's create our first file.

Run:

touch day1.txt
Enter fullscreen mode Exit fullscreen mode

Now:

ls
Enter fullscreen mode Exit fullscreen mode

You should see:

day1.txt
Enter fullscreen mode Exit fullscreen mode

We created an empty file.


22. cat — Read a File

Run:

cat day1.txt
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

23. echo — Print Text

Run:

echo "Hello DevOps"
Enter fullscreen mode Exit fullscreen mode

You should see:

Hello DevOps
Enter fullscreen mode Exit fullscreen mode

The computer printed the text back to you.


24. Put Text Into a File

Now run:

echo "Hello DevOps" > day1.txt
Enter fullscreen mode Exit fullscreen mode

We are telling the computer:

Take:
Hello DevOps

and put it into:
day1.txt
Enter fullscreen mode Exit fullscreen mode

Now read the file:

cat day1.txt
Enter fullscreen mode Exit fullscreen mode

You should see:

Hello DevOps
Enter fullscreen mode Exit fullscreen mode

25. What Does > Mean?

This symbol:

>
Enter fullscreen mode Exit fullscreen mode

is called redirection.

For now, understand it simply as:

Send this output into this file.
Enter fullscreen mode Exit fullscreen mode

Example:

echo "I am learning DevOps" > student.txt
Enter fullscreen mode Exit fullscreen mode

Then:

cat student.txt
Enter fullscreen mode Exit fullscreen mode

Output:

I am learning DevOps
Enter fullscreen mode Exit fullscreen mode

We will learn redirection in much more detail later.


26. cp — Copy

cp means:

copy
Enter fullscreen mode Exit fullscreen mode

Create a file:

touch engineer.txt
Enter fullscreen mode Exit fullscreen mode

Copy it:

cp engineer.txt engineer-backup.txt
Enter fullscreen mode Exit fullscreen mode

Now:

ls
Enter fullscreen mode Exit fullscreen mode

You should see:

engineer.txt
engineer-backup.txt
Enter fullscreen mode Exit fullscreen mode

The original file still exists.

We created a copy.


27. mv — Move or Rename

mv means:

move
Enter fullscreen mode Exit fullscreen mode

but it can also be used to rename something.

Example:

mv engineer.txt devops-engineer.txt
Enter fullscreen mode Exit fullscreen mode

Now run:

ls
Enter fullscreen mode Exit fullscreen mode

Instead of:

engineer.txt
Enter fullscreen mode Exit fullscreen mode

you should see:

devops-engineer.txt
Enter fullscreen mode Exit fullscreen mode

We renamed the file.


28. Move a File Into Another Directory

Create directories:

mkdir developers
mkdir devops-team
Enter fullscreen mode Exit fullscreen mode

Create a file:

touch employee.txt
Enter fullscreen mode Exit fullscreen mode

Move the file:

mv employee.txt devops-team/
Enter fullscreen mode Exit fullscreen mode

Now check:

ls
Enter fullscreen mode Exit fullscreen mode

The file disappeared from the current directory because we moved it.

Check inside:

ls devops-team
Enter fullscreen mode Exit fullscreen mode

You should see:

employee.txt
Enter fullscreen mode Exit fullscreen mode

29. rm — Delete a File

rm means:

remove
Enter fullscreen mode Exit fullscreen mode

Create a test file:

touch delete-me.txt
Enter fullscreen mode Exit fullscreen mode

Check:

ls
Enter fullscreen mode Exit fullscreen mode

Now delete it:

rm delete-me.txt
Enter fullscreen mode Exit fullscreen mode

Check again:

ls
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Terminal is the same idea.

Instead of:

Create a folder.
Enter fullscreen mode Exit fullscreen mode

we say:

mkdir folder
Enter fullscreen mode Exit fullscreen mode

Instead of:

Go inside the folder.
Enter fullscreen mode Exit fullscreen mode

we say:

cd folder
Enter fullscreen mode Exit fullscreen mode

Instead of:

Tell me where I am.
Enter fullscreen mode Exit fullscreen mode

we say:

pwd
Enter fullscreen mode Exit fullscreen mode

Instead of:

Show me what is here.
Enter fullscreen mode Exit fullscreen mode

we say:

ls
Enter fullscreen mode Exit fullscreen mode

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 ~
Enter fullscreen mode Exit fullscreen mode

Check:

pwd
Enter fullscreen mode Exit fullscreen mode

Create a practice directory:

mkdir devops-practice
Enter fullscreen mode Exit fullscreen mode

Enter it:

cd devops-practice
Enter fullscreen mode Exit fullscreen mode

Check:

pwd
Enter fullscreen mode Exit fullscreen mode

Create three directories:

mkdir developers
mkdir devops
mkdir managers
Enter fullscreen mode Exit fullscreen mode

Check:

ls
Enter fullscreen mode Exit fullscreen mode

You should see:

developers
devops
managers
Enter fullscreen mode Exit fullscreen mode

Enter DevOps:

cd devops
Enter fullscreen mode Exit fullscreen mode

Create a file:

touch student.txt
Enter fullscreen mode Exit fullscreen mode

Add text:

echo "I am learning DevOps" > student.txt
Enter fullscreen mode Exit fullscreen mode

Read it:

cat student.txt
Enter fullscreen mode Exit fullscreen mode

Copy it:

cp student.txt student-backup.txt
Enter fullscreen mode Exit fullscreen mode

Check:

ls
Enter fullscreen mode Exit fullscreen mode

Rename it:

mv student.txt devops-engineer.txt
Enter fullscreen mode Exit fullscreen mode

Check:

ls
Enter fullscreen mode Exit fullscreen mode

Delete the backup:

rm student-backup.txt
Enter fullscreen mode Exit fullscreen mode

Check again:

ls
Enter fullscreen mode Exit fullscreen mode

Go back:

cd ..
Enter fullscreen mode Exit fullscreen mode

Check:

pwd
Enter fullscreen mode Exit fullscreen mode

Then:

ls
Enter fullscreen mode Exit fullscreen mode

33. Final Structure

If everything worked, you should have something similar to:

devops-practice/
│
├── developers/
│
├── devops/
│   └── devops-engineer.txt
│
└── managers/
Enter fullscreen mode Exit fullscreen mode

And inside:

devops-engineer.txt
Enter fullscreen mode Exit fullscreen mode

you should have:

I am learning DevOps
Enter fullscreen mode Exit fullscreen mode

34. Challenge — Don't Look at the Answers First

Try this by yourself:

Create a directory called:

company
Enter fullscreen mode Exit fullscreen mode

Inside company, create:

frontend
backend
devops
Enter fullscreen mode Exit fullscreen mode

Inside devops, create:

engineer.txt
Enter fullscreen mode Exit fullscreen mode

Put this text inside:

I want to become a DevOps Engineer
Enter fullscreen mode Exit fullscreen mode

Then:

  1. Display the contents of the file.
  2. Make a copy called engineer-backup.txt.
  3. Rename engineer.txt to senior-devops.txt.
  4. Delete the backup.
  5. Show all remaining files.

The commands you will need are:

mkdir
cd
pwd
ls
touch
echo
cat
cp
mv
rm
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

For example:

cd ~/Downloads
ls
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

If this happens, go to:

System Settings
→ Privacy & Security
→ Files and Folders
Enter fullscreen mode Exit fullscreen mode

Look for Terminal and allow access.

If Terminal is not listed or the problem continues, check:

System Settings
→ Privacy & Security
→ Full Disk Access
Enter fullscreen mode Exit fullscreen mode

Add/enable:

Terminal.app
Enter fullscreen mode Exit fullscreen mode

Then completely quit Terminal:

Command + Q
Enter fullscreen mode Exit fullscreen mode

Open Terminal again and retry:

cd ~/Downloads
ls
Enter fullscreen mode Exit fullscreen mode

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?
Enter fullscreen mode Exit fullscreen mode

Then choose the command.

Today:

Human instruction
       ↓
Computer instruction
       ↓
Linux/Unix command
       ↓
Result
Enter fullscreen mode Exit fullscreen mode

Later we will go from individual commands to:

Commands
   ↓
Scripts
   ↓
Automation
   ↓
CI/CD
   ↓
Cloud
   ↓
Docker
   ↓
Kubernetes
   ↓
Production
Enter fullscreen mode Exit fullscreen mode

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?
Enter fullscreen mode Exit fullscreen mode

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)