Linux Basics
This guide covers essential commands and skills for effective Linux administration on your VPS server.
Connecting via SSH
Connect from any operating system using SSH:
Note: All CoreSynth servers run Linux. Use any SSH client (Terminal, PowerShell, Termius, PuTTY, etc.)
Basic Navigation
| Command | Description |
|---|---|
pwd | Show current directory |
ls | List files |
ls -la | List files including hidden |
cd directory | Change to directory |
cd ~ | Go to home directory |
cd .. | Go up one level |
Important Directories
| Directory | Contents |
|---|---|
/root | Root user’s home directory |
/home | User home directories |
/var/www | Web files and applications |
/var/log | System logs |
/etc | Configuration files |
/tmp | Temporary files |
File Operations
| Command | Description |
|---|---|
cat file | Display file contents |
nano file | Edit file in Nano editor |
cp source destination | Copy file |
mv source destination | Move/rename file |
rm file | Delete file |
mkdir directory | Create directory |
rm -r directory | Delete directory recursively |
Nano Editor
Nano is a simple terminal text editor.
| Shortcut | Action |
|---|---|
Ctrl + O | Save file |
Ctrl + X | Exit editor |
Ctrl + W | Search in file |
Ctrl + K | Delete line |
Ctrl + U | Undelete line |
Package Management (apt)
# Update package list
apt update
# Install a package
apt install package-name
# Remove a package
apt remove package-name
# Search for a package
apt search keyword
# Upgrade all packages
apt upgradeService Management (systemctl)
# Start a service
systemctl start service-name
# Stop a service
systemctl stop service-name
# Restart a service
systemctl restart service-name
# Check service status
systemctl status service-name
# Enable on boot
systemctl enable service-name
# Disable on boot
systemctl disable service-nameSystem Monitoring
| Command | Description |
|---|---|
htop | Interactive process manager |
df -h | Disk usage |
free -h | RAM usage |
uptime | System uptime |
top | Basic process overview |
Network Commands
| Command | Description |
|---|---|
ip a | Show IP addresses |
ping -c 4 domain.com | Test connectivity |
curl ifconfig.me | Get public IP |
netstat -tlnp | Active TCP ports |
ss -tlnp | Active TCP ports (modern) |
nslookup domain.com | DNS lookup |
User Management
# Add a new user
adduser username
# Switch to user
su username
# Add user to sudo group
usermod -aG sudo usernameFile Permissions
# Change file owner
chown user:group file
# Change permissions
chmod 755 file
# Example: make script executable
chmod +x script.shUseful Tips
| Tip | Description |
|---|---|
| Tab | Auto-complete command |
| Arrow Up | Previous command from history |
| Ctrl + C | Cancel current operation |
| Ctrl + L | Clear screen |
| history | Show command history |
Need help? Open a support ticket or ask Alex.
Last updated on