Mastering Linux Core Operations: Users, Permissions, sudo, Packages & Services (Beginner → Intermediate)

Linux remains one of the most essential skills for cloud engineers, DevOps practitioners, and system administrators. Every automation pipeline, container platform, and cloud workload eventually touches Linux. Instead of memorizing commands, the most effective way to learn is through structured, hands‑on labs that build confidence and deepen understanding.

This tutorial‑driven guide walks you through the core operations every engineer must master: users, permissions, sudo, package management, and services. I will also include practical labs you can follow on any Linux system in each section.

In the previous post, I talked about How Linux really works. 
This lab teaches you how to operate and control a Linux system safely. This is the point where learners stop being “Linux users” and start thinking like Linux administrators.

WHAT ARE LINUX CORE OPERATIONS?

Linux Core Operations are the fundamental administrative tasks required to:

  • Control who can access the system

  • Control what files can be accessed

  • Control which commands require elevated privileges

  • Control what software is installed

  • Control what services run automatically

Every Linux administrator, DevOps engineer, or cloud engineer relies on these operations daily.

USERS & GROUPS: IDENTITY IN LINUX

Linux treats everything as a file, and every file belongs to a user and a group. Understanding this relationship is the foundation of permissions, security, and automation.

What Is a User in Linux?

A user is an identity that Linux uses to determine:

  • Ownership of files

  • Permission to run commands

  • Access to system resources

Linux is multi-user by design, even on a personal machine.

UID & GID (CRITICAL CONCEPTS)

  • UID (User ID): Numeric identifier for a user

  • GID (Group ID): Numeric identifier for a group

  • /etc/passwd: Stores user account information.
  • /etc/group: Stores group definitions.

Linux uses numbers internally, not names.

System users (services) usually have:

  • UID < 1000
    Human users usually have:

  • UID ≥ 1000

Inspect Users & Identity

whoami
id
cat /etc/passwd
cat /etc/group

What This Teaches

whoami

Meaning: Shows the current logged‑in user.

Why it matters: It confirms which identity the shell is operating under, essential when dealing with permissions, sudo, or scripts.

id

Meaning: Displays your UID, GID, and all group memberships.

Why it matters: This command reveals your security context — what you can access, what groups you belong to, and how the system sees you.

This tells you:

  • Your user ID
  • Your primary group
  • All secondary groups (e.g., sudo)

cat /etc/passwd

Meaning: Displays the system’s list of users.

What the file contains: Each line represents a user account with fields like:

  • Username
  • UID
  • GID
  • Home directory
  • Default shell

Why it matters: It helps you understand:

  • Which users exist
  • System vs human accounts
  • Login shells
  • Home directory locations

cat /etc/group

Meaning: Shows all groups on the system.

What the file contains: Each line lists:

  • Group name
  • GID
  • Members

Why it matters: Groups control access to:

  • Files
  • Directories
  • System resources
  • Administrative privileges

FILE PERMISSIONS & OWNERSHIP: ACCESS CONTROL

Linux controls file access using permissions + ownership.

Permission Types

  • r → read

  • w → write

  • x → execute

Permission Scope

  • Owner

  • Group

  • Others

Example:

-rwxr-x---

 

Why Permissions Exist

Permissions prevent:

  • Accidental system damage

  • Unauthorized access

  • Privilege escalation

This is security by design, not inconvenience.

Read Permission Output

ls -l

Break down:

  • File type

  • Permission bits

  • Owner

  • Group

Modify Permissions Safely

chmod 644 file.txt
chmod 755 file1.txt

Key Lesson

777 is almost never correct.
Understand what you are granting and to whom.

Change Ownership

sudo chown user:group file3.txt

Ownership ≠ permissions.
Both work together.

sudo & ROOT: CONTROLLED POWER

The sudo command allows trusted users to run privileged commands without logging in as root. This protects the system and enforces least privilege.

Who Is Root?

root is the superuser with unrestricted access.

Linux protects root because:

  • One mistake can destroy the system

  • Security depends on limited privilege

What sudo Really Does

sudo temporarily allows a trusted user to run a command as root.

It:

  • Logs actions

  • Limits access

  • Reduces risk

Inspect sudo Privileges

sudo -l
sudo whoami

 

Key Lesson

Admins borrow power, they don’t live as root.

Why sudo matters

  • Reduces risk
  • Provides audit logs
  • Allows fine‑grained control
  • Prevents accidental system damage

PACKAGE MANAGEMENT: SOFTWARE CONTROL

Linux distributions use package managers to install, update, and remove software. Ubuntu uses apt, while RHEL‑based systems use yum or dnf.

Linux does not install software randomly, instead, it uses:

  • Trusted repositories

  • Dependency resolution

  • Cryptographic verification

This is why Linux systems are stable and secure.

Package Manager (Debian/Ubuntu Example)

  • apt = Advanced Package Tool

Manage Software

sudo apt update
sudo apt install tree
tree
sudo apt remove tree

What Happens Behind the Scenes

  • Repository metadata is updated

  • Dependencies are resolved

  • Files are tracked for clean removal

SERVICES & systemd: WHAT RUNS YOUR SYSTEM

Modern Linux systems use systemd to manage services. Understanding systemd is crucial for troubleshooting, automation, and server administration.

What Is a Service?

A service is a background process that:

  • Starts automatically

  • Runs without user interaction

  • Provides core functionality (SSH, web servers, logging)

What Is systemd?

systemd is the init system that:

  • Starts services at boot

  • Monitors them

  • Restarts them if they fail

Inspect Services

systemctl status ssh
systemctl list-units --type=service

Control a Service

sudo systemctl stop ssh
sudo systemctl start ssh
sudo systemctl restart ssh

Enable Services at Boot

sudo systemctl enable ssh
sudo systemctl disable ssh

Key Difference

  • RunningEnabled

  • One affects now, the other affects boot

Key systemd concepts

  • Service: A background process
  • Unit file: Defines how a service runs
  • Journal: Centralized logging system

You now understand how to:
✔ Manage users and groups
✔ Control file access safely
✔ Use sudo correctly
✔ Install and remove software
✔ Control system services

This is real Linux operational knowledge.

Final Challenge: Beginner → Intermediate

Put your new skills to the test by completing this challenge:

Your Task

  1. Create a user named yourname.
  2. Create a group named projectteam.
  3. Add the user to the group.
  4. Create a shared folder /opt/project.
  5. Assign group ownership to projectteam.
  6. Apply SGID so files inherit the group.
  7. Install Apache or Nginx.
  8. Enable and start the service.
  9. Document your steps.

This challenge reinforces everything you’ve learned and builds real‑world confidence.

Conclusion

Linux core operations form the backbone of every cloud and DevOps workflow. By mastering users, permissions, sudo, package management, and services, you gain the ability to manage systems confidently and troubleshoot issues with precision. This gives you a strong foundation for more advanced topics such as automation, scripting, containers, and cloud infrastructure.

Want to practice these concepts? Head over to the Linux Core Operations: Full Hands‑On Practical Labs for Users, Permissions, sudo, Packages & Services and start building real Linux intuition.

Leave a Comment

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners. View more
Cookies settings
Accept
Decline
Privacy & Cookie policy
Privacy & Cookies policy
Cookie name Active

Who we are

Suggested text: Our website address is: https://humbletech.cloud.

Comments

Suggested text: When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection. An anonymised string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service Privacy Policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

Suggested text: If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

Suggested text: If you leave a comment on our site you may opt in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year. If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser. When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed. If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Suggested text: Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website. These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

Suggested text: If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

Suggested text: If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognise and approve any follow-up comments automatically instead of holding them in a moderation queue. For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

Suggested text: If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Suggested text: Visitor comments may be checked through an automated spam detection service.
Save settings
Scroll to Top