Linux System and Administration Concept

This is a preview lesson
Register or sign in to take this lesson.

If you’re going to be doing DevOps, Linux systems(OS) are the most used and reliable to run applications and servers. So, knowledge of the basics of Linux is a must need. As DevOps means closing the gap between the development team and operation team.

It’s not difficult to learn Linux basics like ssh-ing the server, creating, editing, and executing the files. But if you chase hardcore Linux and system admin jobs, then it can take years to become an expert.

For beginners, I recommend you to check out: Linux Upskill Challenge, Essentials of System Admin.

For now, let’s discuss the basics of the Linux system and Linux system administration.

Linux system and its components?

Why is Linux so widely used? One of the main reasons is, that its kernel can be used by any programmer to create customized operating systems, and also it is an open-source operating system. It’s written in C, as well as other programming languages including C++, Assembly, Objective-C, and others. Many operating systems, including Ubuntu, Fedora, Debian, and dozens of others, use Linux as their kernel. The components of a Linux operating system are as follows:

  1. Boot loader – This is a piece of software that controls the computer’s boot process. The majority of users will see a splash screen before the machine begins the boot process.
  2. Kernel – A key component that acts as Linux’s brain, managing the CPU, memory, and peripheral devices (I/O). It is located at the very bottom of the Operating System.
  3. Init system – This is a subsystem that controls daemons and regulates the boot process after the first boot loading.
  4. Daemons – These are background services (printing, scheduling, and so on) that operate until the system is turned off.
  5. Graphical server – This is the subsystem that displays graphics on the monitor and is also known as the X server.
  6. Desktop environment – This is the component that allows users to engage with one other. It has pre-installed programs (such as file managers, web browsers, games, and different configuration tools).
  7. Applications – There are no built-in apps, unlike Windows or Mac. To do your specialized responsibilities, you must install indicidual software. To make the installation process easier, several current Linux versions feature App Stores. The Ubuntu Software Center, for example, allows you to rapidly search through hundreds of software and install them all in one spot.

Linux system administration

Linux is a significant computer strength that is used in many web servers, cloud servers, and other applications. A Linux systems administrator oversees various tasks such as maintaining, establishing user accounts, conducting backups and providing complete Linux administration. Because of its great advantages, such as high security, reliability, and open-source, Linux is used by a significant number of devices. The following are the fundamentals that any Linux System Administrator should know in order to conduct Linux administration tasks:

  • Linux Filesystem
  • Managing Root or Super User
  • Basic Bash Command
  • Handling Files, Directories, and Users

1. Linux Filesystem

The Linux file system is a means of storing files on a hard disk, and Linux supports the following file systems:

  • Traditional disk file systems may compress files, such as NTFS, Btrfs, JFS, SFS, and ext4.
  • File systems for storing files on flash-based storage devices, such as JFFS2, YAFFS, ubifs, and others.
  • sysfs, debugfs, tmpfs, and other special-purpose file systems

Layout of standard Filesystem or hierarchy or linux filesystem:

2. Managing Root or super User

It is a more special kind of user account that has all types of permissions to make changes in the services or programs of Linux. su command is used to become a superuser. Provide the root password with su command and become root or superuser.

3. Basic Bash Command

Bash is a default shell in macOS, Windows subsystems for Linux, and several Linux operating systems. It can be used to execute different commands with the following syntax:

bash [options] [file]

4. Handling File, Directories, and Users

When you want to interact with files either text or device files, you should interact with particular commands. Many operations are discussed below:

  • Creating file: “touch” command can be used to create an empty file and “cat>” to create a file. Also, you can view a file type using the “cat” command.
  • Copying file: “cp” command can be used to copy a file from one location to another.
  • Removing file: “rm” is used to remove the file.
  • Renaming or moving file: “mv” command is used to move and rename a file.
  • Soft links and hard links: Soft links can be created by the command “ln”. Use “ln –s” for the soft link.
  • File permissions: There are three types of file permissions: read, write or execute and only a superuser can change. Use “chmod g+w” and provide the file name with this command to give write permission to any particular group. “chmod o+x” for execute permission to other users and “chmod g-x” to take away from the execute permissions from a group. 
  • Display working directory: you can use “pwd” command to display the current working directory.
  • Creating a directory: use “mkdir” command and create a directory.
  • Removing a directory: There is two option either you can delete the empty directory by “rmdir” command or use “rmdir -p” to remove the specified directory with its parent directories.
  • Add user: use ”adduser” command to add a new user to the system.
  • Delete user: use “userdel” command and delete any user and its related files.
  • Modify user: use “usermod” command and modify a user account.
  • Change Password expiry: use “chage” command to change the password expiry information.

Linux Administrator Roles and Responsibilities

Every organization must need system administration for a solid foundation and well-managed administering processes. The role of every Linux administrator may be changed from organization to organization. Following are the duties of a Linux system administrator:

  • Managing all internet requests inclusive to DNS, Apache, MySQL, RADIUS, and PHP.
  • Excellent client support for LAN, ISP, and hosting customers along with fixing error logs.
  • Communicate with vendors and customers in an efficient way.
  • Data of any organization is very important, so takes backups on a regular basis.
  • Enhances the functionality of the Linux environment for users with the help of different tools.
  • Login issues and disaster recovery is also included in the Linux administration.
  • Security is another important thing for any organization, so the system administrator will conduct the meeting with network engineers and other employees to analyze the hardware requirements and installs the required system & security tools.
  • In case of any error in the server, s/he will perform the troubleshooting process to fix the issues.

Essential Skills for Linux System Administration

As a DevOps, linux system administration is also an important skill one should have. In order to secure a career as a Linux system admin or DevOps you need to do the following:

  • Install the Linux and understand all the basics
  • User account management
  • Structured Query Language (SQL)
  • Network traffic packet capture
  • The vi editor
  • Network routers and firewalls
  • Network switches
  • Backup and restore
  • Hardware setup and troubleshooting
  • SIEMs and monitoring systems
  • Learn different useful methods to write documentation

If you are a newbie, you can also get the job of Linux Administration but keep in touch with the latest skills and learning in the Linux community.

Linux Distros for DevOps

Here are the most used, well-known, established Linux distributions which are often used by big companies.

Red Hat Enterprise Linux, CentOS, Fedora & Amazon Linux

All these distros are almost similar.

  • CentOS: It is a more “stable” server distribution with fewer packages and less frequent releases. Many businesses choose CentOS because they desire a low-cost, slow, and stable Linux distribution.
  • RHEL: It is even more stable and slow-moving than CentOS. It’s mostly used in big businesses like banks. Although it is commercial, Red Hat offers a free developer subscription if you wish to try it out.
  • Amazon Linux: If you create a basic EC2 computer in AWS, you’ll almost certainly use Amazon Linux. It is similar to the other distributions like CentOS, RHEL, Fedora, etc.
  • Fedora: It is aimed toward home users and geeks. It’s less likely to be used in DevOps or to run a server. This is because it has regular releases and frequently changes.

Ubuntu/Debian

Ubuntu and Debian are two distributions that are closely connected since they share many of the same packages and technologies.

Ubuntu is extremely popular, and rightfully so. It’s simple to set up and utilize, which is why everyone from gamers to developers has accepted it. They are also used in the business world since they have enterprise support for it.

Alpine Linux

Alpine Linux isn’t about humming The Sound of Music while entering commands in gorgeous Alpine landscapes (sadly).

Alpine is a Linux distribution aimed at small businesses. It doesn’t include a bunch of stuff you might get in other Linux distros. It’s also gaining popularity because of its stripped-down design, which makes it perfect for running applications in containers.

Conclusion

In this section, we’ve discussed the basic concept of Linux and system administration. As a DevOps, you have to know a lot more than this which you need to learn and explore yourself.

Thank you!