Getting Started with Linux-Day 2

Sahal ImranSahal Imran
5 min read

Choosing the Linux distribution

Today I installed Ubuntu 24 LTS in my laptop to officially start to learn Linux and used it like I use my Windows laptop. Transitioning for Windows is difficult as it is user friendly and it has a very good graphical user interface, the reason I used ubuntu over centos is because:

  • Ubuntu offers a visually appealing experience, with a user-friendly GUI that's perfect for those accustomed to the sleek interfaces of Windows.

  • Ubuntu is the most popular platform for OpenStack deployment.

  • Unlike Redhat, Ubuntu also offers professional support and services for enterprises, providing an optional support model, so I could really get used to it as my daily driver and it will also help me if my organization uses it.

  • Although I do know that Redhat enterprise Linux is the most used Linux distro in business scenarios, but Ubuntu is not that far off specially startups prefers ubuntu more over RHL.

All these differences aside, use any Linux distro and you are good to go, it all comes down to your personal preference.

Navigation in Linux

To me Ubuntu really is very good when it comes to the GUI part of the operating system specially of Linux systems. Navigation using mouse is as simple as it is in Windows. But the power of Linux is not in its GUI but in it's command line interface (CLI) which quite overwhelming at first. The use of commands to navigate Linux is as intriguing as it appears in movies and television series like in the series Silicon Valley and the movie Matrix.

Understanding the File System

One of the most critical aspects of mastering Linux is understanding its file system, specifically the directory structure. Here’s why it matters:

  • Directory Layout: Knowing where essential directories are located helps you find and manage files more efficiently. For instance:

    • /home: Contains user directories.

    • /etc: Hosts configuration files.

    • /root: The home directory for the root user.

    • /var: Contains variable data like logs and databases.

  • Absolute and Relative Paths: Understanding these paths is crucial for navigating and accessing files. Absolute paths start from the root directory (/), while relative paths are based on the current directory.

  • File Management: Mastery of command-line tools for managing files—such as ls, cd, cp, mv, rm, and find—is essential for efficient system administration.

  • Also, one main thing Everything in Linux is a File.

Transitioning to Linux does have a huge learning curve specially for a Windows user, but by challenging yourself to embrace the command-line tools will set you on a path to becoming proficient DevOps Engineer in this powerful operating system.

My Learnings

Although I didn’t accomplish much today, I focused on laying the foundation for my Linux journey. By familiarizing myself with the fundamental aspects of the system. Today I centered around understanding the basics of Linux, including its core concepts and setup procedures.

  • Learn what Linux is: Explored the basics of Linux and its core features.

  • How it is different from my Windows: Compared Linux with Windows, highlighting key differences in user experience and functionality.

  • Why it is used so much in the industry: Investigated the reasons behind Linux’s popularity and widespread use in various industries.

  • Learned about different kinds of Linux distros: Reviewed various Linux distributions and their specific use cases and advantages.

  • Setting up my system: Installed and configured Ubuntu 24 LTS on my laptop.

  • Learning about the Linux kernel architecture: Studied the architecture of the Linux kernel and its role in the operating system.

  • Learning about the directory structure: Familiarized myself with the Linux directory layout, including key directories like /home, /etc, and /var.

  • Navigation in the file system: Practiced navigating the Linux file system using command-line tools.

  • File manipulation: Learned basic commands for creating, moving, copying, and deleting files.

Exploring Linux Commands

whoami   # gives the name of current logged in user
pwd      # return the current directory you are in
ls       # ls the items in the directory
ls -l    # list the files and directories in long list format with extra information
ls -a    # list all including hidden files and directory
ls *.sh  # list all the files having .sh extension.
ls -i    # list the files and directories with index numbers inodes
ls -d */ # list only directories.(we can also specify a pattern)
cd path  # change directory to the provided path
cd -     # Go to the last working directory.
cd ..    # change directory to one step back.
cd ../.. # Change directory to 2 levels back.
cd ~ or just cd  # change directory to the home directory
mkdir newFolder  # make a new folder 'newFolder'
mkdir .NewFolder # make a hidden directory (also . before a file to make it hidden)
mkdir A B C D    # make multiple directories at the same time
mkdir /home/user/Mydirectory   # make a new folder in a specific location
mkdir -p  A/B/C/D              # make a nested directory
touch filename   # Creates an empty file named filename or updates the timestamp if it exists.
echo "text" > file.txt  # Creates a file named file.txt with the specified text, overwriting it if it already exists.
echo "text" >> file.txt # Appends the specified text to file.txt, creating the file if it doesn't exist.
cat file.txt # Displays the content of file.txt in the terminal.

These are the essential commands in Linux and by understanding how to navigate directories, manage files, and create new directories will greatly enhance my efficiency in using Linux.

Next Step

I'll continue practicing these commands to improve my understanding and make navigating Linux more intuitive. My goal is to become so familiar with these commands that I no longer need to search for how to create files or directories, and can perform these tasks naturally and efficiently. Although search for commands online is not something should be shy of and is perfectly acceptable but my goal is to reach a level of proficiency where using commands feels as seamless as using a graphical interface.

0
Subscribe to my newsletter

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

Written by

Sahal Imran
Sahal Imran