DEV Community

Cover image for AltSchool Of Engineering Tinyuka’24 Month 6 Week 4
Ikoh Sylva
Ikoh Sylva

Posted on

AltSchool Of Engineering Tinyuka’24 Month 6 Week 4

Before we jump into today’s session, I want to give a big shoutout to our amazing Semester 2 instructors! We’ve got Oladapo Abimbola a brilliant computer programmer with solid experience in cloud technologies and Abubakar Siddiq Ango a Developer Education and Community Leader, and also a Developer Relations Engineer. We’re super lucky to have both of them on board this semester!

This week, we began the class with the usual revision which I have covered here and I would also advise that you go through that too if you haven’t already. Let’s dive in shall we?

Image of a brain

Linux Deep Dive

Linux is known for its stability, security, and flexibility qualities that make it the operating system of choice for developers, sysadmins, and enterprises worldwide. But beneath its simplicity lies a powerful system of users, groups, and permissions that ensures secure, multi-user access. Combined with tools like SSH (Secure Shell), Linux becomes the backbone of modern servers, development environments, and cloud infrastructure.

This article takes you on a deep dive into some of the most critical Linux concepts users, groups, managing group membership, file permissions, and secure remote access with SSH all illustrated with practical examples.

Users in Linux

Unlike Windows, where most people use a single admin account, Linux is built as a multi-user operating system. This means multiple users can share the same machine while maintaining privacy and security.

There are two primary types of users:

  • Root User (Superuser): Has unrestricted access to the system. Identified by the username root. Dangerous in the wrong hands!

  • Regular Users: Created for day-to-day tasks. They have limited privileges to prevent accidental system-wide damage.

Creating a New User

sudo adduser john

This creates a new user john, adds a home directory /home/john, and sets a password.

Switching Users

su - john

Switches to the john account.

Groups in Linux

A group is a collection of users. Groups make permission management easier instead of assigning permissions to individual users one by one, you assign them to a group.
Types of groups:

  • Primary Group: Automatically created when a new user is added.

  • Secondary Groups: Additional groups a user may belong to.

Example: Adding a User to a Group

sudo usermod -aG developers john

This adds user john to the developers group.

Checking Group Membership

groups john

Shows all groups john belongs to.

This is especially useful in collaborative environments. For example, you might create a devops group for engineers who need access to deployment scripts, while the finance group has access to accounting files.

File Permissions

File permissions are at the heart of Linux security. Each file and directory has ownership (user and group) and permissions (what actions are allowed).

There are three types of permissions:

  • Read (r): View contents (r)

  • Write (w): Modify contents (w)

  • Execute (x): Run file as program (x)

And they apply to three categories:

  • Owner (u): The user who owns the file

  • Group (g): Members of the file’s group

  • Others (o): Everyone else

Viewing File Permissions

ls -l

Example output:

-rwxr-xr-- 1 john developers 1024 Aug 18 script.sh
Enter fullscreen mode Exit fullscreen mode
  • Owner (john) has rwx (read, write, execute)

  • Group (developers) has r-x (read, execute)

  • Others have r-- (read-only)

Image of a computer user

Changing File Permissions

chmod 755 script.sh

Sets: owner = rwx, group = r-x, others = r-x.

Changing Ownership

chown john:developers script.sh

Sets john as the owner and developers as the group.

Real-World Example:

Imagine a shared project folder where developers need to edit files, but testers only need read access. Permissions and groups allow you to enforce this seamlessly.

SSH (Secure Shell)

One of the most powerful tools in Linux is SSH, which allows secure remote access to another Linux machine over an encrypted connection. SSH is the standard way developers, system admins, and cloud engineers connect to servers.

Basic SSH Command

ssh john@192.168.1.100

Logs into the remote machine at IP 192.168.1.100 as user john.

Using SSH Keys (Recommended over Passwords)

Generate keys on your local machine:

ssh-keygen -t rsa -b 4096

Now you can log in without typing a password.

Practical Example:

Cloud providers like AWS and DigitalOcean provide SSH access to your virtual machines. Instead of logging in with weak passwords, you authenticate with secure cryptographic keys, reducing the risk of brute-force attacks.

Why These Concepts Matter

  • Users and Groups - Prevent chaos in multi-user environments by structuring access.

  • File Permissions - Ensure data is secure and only the right people have access.

  • SSH - Enables remote server management, the backbone of cloud infrastructure.

Real-World Scenarios:

  • A university server with multiple students working on different projects uses groups and permissions to keep projects isolated.

  • A company’s finance team keeps sensitive payroll files readable only by their group.

  • Cloud engineers log into AWS EC2 instances using SSH keys instead of passwords for added security.

Image of a lady

Linux’s power lies in its fine-grained control. Users, groups, permissions, and SSH may seem intimidating at first, but together they form the bedrock of secure system administration. Mastering these concepts means you’re not just using Linux you’re harnessing it.

Whether you’re setting up your first cloud server, managing a development team, or simply learning Linux for personal growth, understanding these fundamentals will make you both more effective and more secure in the Linux world.

I’m Ikoh Sylva, a passionate cloud computing enthusiast with hands-on experience in AWS. I’m documenting my cloud journey from a beginner’s perspective, aiming to inspire others along the way.

If you find my content helpful, please like and follow my posts, and consider sharing this article with anyone starting their own cloud journey.

Let’s connect on social media. I’d love to engage and exchange ideas with you!

LinkedIn Facebook X

Top comments (0)