Today I learned some of the fundamental skills needed to manage a Linux server. These are core concepts that anyone working with servers, DevOps, or backend systems should understand. Below is a summary of what I learned, with explanations and examples.
1. SSH into a Linux Server as Root
SSH (Secure Shell) allows you to securely connect to a remote Linux server.
ssh root@server_ip_address
-
rootis the superuser with full system access -
server_ip_addressis the public or private IP of the server - You may be prompted for a password or use an SSH key
⚠️ Note: Logging in as root is powerful but risky. Best practice is to create a regular user and use sudo instead.
2. Creating a New User
To create a new user:
adduser username
This command:
- Creates a home directory
- Sets up default permissions
- Prompts you to set a password
Example:
adduser victor
3. Switching Between Users
To switch from root to another user:
su - username
Example:
su - victor
The - ensures the user’s environment variables are loaded properly.
4. Navigating the File System
Linux uses a hierarchical file system. Some essential navigation commands:
Check current directory
pwd
List files and folders
ls
ls -la
Change directory
cd /path/to/directory
cd ..
cd ~
5. Copying Files and Directories
Copy a file
cp source_file destination
Copy a directory
cp -r source_directory destination
Example:
cp config.txt /etc/myapp/
6. Moving and Renaming Files
The mv command is used for both moving and renaming.
Move a file
mv file.txt /new/location/
Rename a file
mv oldname.txt newname.txt
7. Editing Files with Nano
Nano is a beginner-friendly terminal text editor.
nano filename
Useful Nano shortcuts:
-
CTRL + O→ Save file -
CTRL + X→ Exit -
CTRL + K→ Cut line -
CTRL + U→ Paste line
Nano is great for quick edits to config files.
8. Granting Sudo Privileges
To allow a user to run administrative commands, add them to the sudo group.
usermod -aG sudo username
Example:
usermod -aG sudo victor
To apply changes immediately, log out and log back in.
Test sudo access:
sudo apt update
9. Deleting a User
Delete a user (keep home directory)
deluser username
Delete a user and their home directory
deluser --remove-home username
⚠️ Be careful — this action is irreversible.
10. Why This Matters
These skills are foundational for:
- Managing cloud servers
- Deploying applications
- Securing production environments
- Working with Docker, CI/CD, and automation tools
Understanding users, permissions, and file management is essential before moving into advanced Linux or DevOps topics.
Final Thoughts
Today’s learning covered:
- Secure server access via SSH
- User creation and management
- Linux file system navigation
- File operations (copy, move, edit)
- Permission control using sudo
This is the groundwork for becoming comfortable and confident on any Linux server. 💪🐧
Top comments (0)