Linux Filesystem and Navigation for DevOps (With Practical Demo)

Source: Dev.to | Dec 18, 2025 (UTC)

Introduction

As someone preparing for a DevOps role, I’m learning Linux with a lean approach — focusing only on what’s required to operate and debug real servers.

This post covers Linux Filesystem and navigation and hands-on demonstrations on Youtube, from a DevOps perspective.

Practical demonstration

YouTube Demo:

In this video, I demonstrate:

  • Filesystem – /, /etc, /var, /var/log, /home, /opt, /tmp
  • Navigation command – ls, cd, pwd, tree, pushd, popd, dirs
  • What are absolute and relative paths
  • Operation on files and directories – cp, mv, rm, mkdir, ln -s, touch, file

Linux directory structure (DevOps view)

/ → root of everything /etc → configuration files /var → variable data (logs, runtime) /var/log → application & system logs /home → user home directories /tmp → temporary files

Enter fullscreen mode

Exit fullscreen mode

Commands Overview

Navigation commands:

# print working directory - return absolute path ~$ pwd /home/username # change directory to / ~$ cd / # to list directory contents /$ ls # to add directory to stack /$ pushd etc/alternatives/ # path not start with / i.e relative path # to check stack /etc/alternatives$ dirs -v # to remove directory to stack /etc/alternatives$ popd # to go back to home directory /$ cd # to list contents of directories in a tree-like format. ~$ tree [dirctory ...]

Enter fullscreen mode

Exit fullscreen mode

Operation on directory:

# To make directory /tmp$ mkdir DIRNAME # To make directory along with subdirectory /tmp$ mkdir -p DIRNAME/SUB-DIR/SUB-SUB-DIR # To copy the directory /tmp$ cp -r DIRNAME/ OTHERDIR/ # To make duplicate directory with different name /tmp$ cp -r DIRNAME/ NEW_DIR/ # To move directory /tmp$ mv TARGET_DIR/ DEST_DIR/ # To rename directory /tmp$ mv DIRNAME/ RENAMED_DIR/ # To remove/delete directory /tmp$ rm -r DIRNAME

Enter fullscreen mode

Exit fullscreen mode

Operation on file:

# To make file /tmp$ touch FILE # To copy the file /tmp$ cp FILE DEST # To make duplicate file with different name /tmp$ cp FILE NEW_FILE # To move file /tmp$ mv TARGET_FILE DEST # To rename file /tmp$ mv FILE RENAMED_FILE # To remove/delete file /tmp$ rm FILE

Enter fullscreen mode

Exit fullscreen mode

Common mistakes

Validation test

If you:

Then this topic is DONE.

What’s next

Next, I’m learning Linux permissions & ownership, which causes most deployment failures.

For further actions, you may consider blocking this person and/or reporting abuse

Залишити відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *

Читайте також