Day 6 โ€“ Exploring Linux Basic


On Day 6 of my DevOps journey, I explored the Linux terminal hands-on. I used essential commands to navigate the system, read files, and understand the structure of Linux.


๐Ÿ’ป Basic Commands I Practiced

Here are the commands I used today and what they do:

CommandPurpose
whoamiShows the current logged-in user
pwdPrints the current working directory
lsLists files and folders
cdChanges directory
clearClears the terminal screen
cat /etc/os-releaseDisplays OS info
sudo -iSwitches to the root user
exitExits a session (root or normal)

๐Ÿ“‚ Navigating the File System

I explored various system directories using cd and ls:

  • /bin, /sbin โ€“ essential binaries and system tools

  • /etc โ€“ system configuration files (like hostname)

  • /boot, /boot/grub2 โ€“ bootloader files

  • /tmp โ€“ temporary files

  • /proc โ€“ virtual system info (processes, uptime)


๐Ÿ“Š Viewing System Info

Some useful commands I tried for system insight:

  • uptime โ€“ Shows how long the system has been running

  • cat /proc/uptime โ€“ Same info but in raw format

  • free -m โ€“ Displays memory usage in MB


๐Ÿง  What I Learned

  • Linux has a clear directory hierarchy, and each folder has a specific purpose.

  • Commands like cd, ls, and pwd make navigating easy.

  • /proc is a virtual filesystem that shows real-time system data.

  • You can switch to root (sudo -i) for full control, but use it cautiously.


๐Ÿ”š Wrapping Up

Today was all about exploring and understanding how Linux is structured and how to move around it. These basics are powerful and essential for any DevOps or Linux user.

Tomorrow, Iโ€™ll dive into file management, permissions, and editing files from the terminal.


0
Subscribe to my newsletter

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

Written by

Shaharyar Shakir
Shaharyar Shakir