DevOps Day 2 – Into the Terminal: Mastering Linux Basics

Jayanth BJayanth B
3 min read

Goal

Get practical experience with the Linux file structure, essential navigation commands, and basic ways to work with files. These skills are the building blocks for anyone starting in DevOps.

What I Learned Today

  • Explored the Linux directory layout.

  • Practiced moving around in the file system using the terminal.

  • Learned how to create, edit, copy, move, and delete files and directories.

  • These fundamentals are necessary because almost all DevOps automation happens on Linux.

Key Concepts

ConceptDescription
/ (root)The top directory; every other directory branches from here.
File TypesIncludes regular files, directories, symbolic links, and more.
Path TypesAbsolute paths (/home/user) vs relative paths (../folder).
Hidden FilesStart with a dot (e.g., .bashrc) and are not visible by default.
PermissionsWho can read, write, or execute files (user, group, others).

Commands Practiced

CommandWhat It Does
pwdShows your current working directory.
ls -laLists all files (even hidden ones), in detail.
cdChanges your directory.
touch file.txtMakes a new, empty file.
mkdir dir_nameCreates a new directory.
cp file1 file2Copies a file.
mv old newMoves or renames files/directories.
rm fileRemoves a file.
rmdir dirDeletes an empty directory.
cat file.txtShows what's inside a file.
nano file.txtOpens the file in the nano text editor.

Terminal Practice

Try running these commands in your terminal:

bashpwd
cd /home
mkdir devops_day2
cd devops_day2
touch notes.txt
echo "Linux is awesome!" > notes.txt
cat notes.txt
ls -la

Realization

Knowing how to use Linux isn’t just useful for DevOps—it’s essential. Even basic navigation means you can set up servers, work with containers like Docker, and automate tasks with ease.

Tips

  • Press Tab to autocomplete file and folder names.

  • Press Ctrl + L to clear the terminal screen.

  • Be cautious with rm -rf; double-check the path before deleting!

Proof of Practice

Mini Assignment

Try these steps to reinforce your learning:

  1. Create a directory called devops-practice.

  2. Inside it, create a file named commands.txt.

  3. Open commands.txt with nano and write 5 Linux commands along with brief explanations.

  4. Copy the file to commands_backup.txt.

  5. Make a new subdirectory named backup and move commands_backup.txt into it.

  6. Delete the original commands.txt file.

What’s Next

Tomorrow’s focus: Linux permissions, ownership, and the powerful chmod and chown commands!

1
Subscribe to my newsletter

Read articles from Jayanth B directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jayanth B
Jayanth B