DevOps & Linux Administration

Users, Permissions & Packages


Module IV: Users, Permissions & Packages. This module introduces Linux user management, file permissions, administrative privileges, and software package management. These concepts are extremely important in Linux administration, server management, and DevOps workflows.


Linux as a Multi-User Operating System

Linux is designed as a multi-user operating system, meaning multiple users can access and use the same system simultaneously while maintaining security and separation between accounts.

Each user has:

  • Unique username and password
  • Personal home directory
  • Separate permissions and access rights
  • Individual files and configurations

Linux User Hierarchy

Root User (Administrator)
Developer User
Guest User
System User

Root User and sudo

The root user is the administrator account in Linux. It has complete control over the system including software installation, user management, and configuration changes.

To safely execute administrative tasks, Linux provides the sudo command which temporarily grants administrator privileges.

Example Commands

$ sudo apt update

$ sudo apt install nginx

$ sudo reboot

Root User

Has unrestricted system access and administrative control.

sudo Command

Allows normal users to execute administrative commands securely.


Linux File Permissions

Linux uses a permission system to control access to files and directories. Permissions determine who can read, write, or execute files.

SymbolPermissionMeaning
rReadView file contents
wWriteModify file contents
xExecuteRun executable files

Permission Structure

-rwxr-xr--

Owner  Group  Others
  • First set → Owner permissions
  • Second set → Group permissions
  • Third set → Other users permissions

chmod Command

The chmod command is used to change file permissions in Linux.

Example Commands

$ chmod +x script.sh

$ chmod 755 file.txt

$ chmod 644 notes.txt
NumberPermission
7Read + Write + Execute
6Read + Write
5Read + Execute
4Read Only

Linux Package Management

Linux distributions use package managers to install, update, and remove software applications efficiently.

Package Management Workflow

Search Package
Install Package
Update Software
Remove Package
Package ManagerDistribution
aptUbuntu / Debian
yumCentOS / Red Hat
pacmanArch Linux

Example Commands

$ sudo apt update

$ sudo apt install git

$ sudo apt remove nginx

Basic User Management Commands

CommandPurpose
whoamiDisplays current user
adduserCreates new user
passwdChanges user password
suSwitches user account

Summary

In this chapter, we explored Linux users, permissions, administrative privileges, package management, and important system administration commands. These concepts are essential for Linux system management, server administration, and DevOps operations.