Catalog / Networking & Administration Cheatsheet
Networking & Administration Cheatsheet
A comprehensive cheat sheet covering essential networking and system administration concepts, commands, and configurations.
Networking Fundamentals
OSI Model
Layer 7: Application |
Provides network services to applications. (e.g., HTTP, SMTP, DNS) |
Layer 6: Presentation |
Deals with data representation, encryption, and decryption. (e.g., SSL/TLS) |
Layer 5: Session |
Manages connections between applications. (e.g., session establishment, termination) |
Layer 4: Transport |
Provides reliable or unreliable data delivery. (e.g., TCP, UDP) |
Layer 3: Network |
Handles routing of data packets. (e.g., IP) |
Layer 2: Data Link |
Provides error-free transmission of data frames. (e.g., Ethernet, MAC addresses) |
Layer 1: Physical |
Deals with physical transmission of data. (e.g., cables, connectors) |
Common Protocols
TCP |
Transmission Control Protocol - Reliable, connection-oriented protocol. |
UDP |
User Datagram Protocol - Unreliable, connectionless protocol. |
IP |
Internet Protocol - Responsible for addressing and routing packets. |
HTTP |
Hypertext Transfer Protocol - Used for web communication. |
HTTPS |
HTTP Secure - Secure web communication using SSL/TLS. |
DNS |
Domain Name System - Translates domain names to IP addresses. |
DHCP |
Dynamic Host Configuration Protocol - Automatically assigns IP addresses to devices. |
IP Addressing
IP addresses are logical addresses assigned to network interfaces. IPv4: 32-bit address (e.g., 192.168.1.1) |
Subnet Mask: Used to determine the network and host portions of an IP address. (e.g., 255.255.255.0) |
CIDR Notation: Represents the subnet mask as a suffix to the IP address. (e.g., 192.168.1.0/24) |
Private IP Addresses: Used within private networks (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) |
Public IP Addresses: Used on the internet and are globally routable. |
System Administration Basics
User Management (Linux)
|
Create a new user account. |
|
Set or change the password for a user. |
|
Delete a user account. |
|
Modify a user account |
|
Create a new group. |
|
Delete a group. |
|
Add a user to a group. |
|
Display user identity (UID, GID, groups). |
File Permissions (Linux)
File permissions control access to files and directories. Permissions: |
|
Example: |
|
|
Process Management (Linux)
|
Display running processes. |
|
Display real-time system resource usage. |
|
Terminate a process by its PID. |
|
Terminate a process by name. |
|
Move a process to the background. |
|
Move a process to the foreground. |
|
Run a command that persists after logout. |
Network Configuration
ifconfig/ip (Linux)
|
Display network interface configuration. |
|
Display network interface addresses. |
|
Display network interface link status. |
|
Display routing table. |
|
Add an IP address to an interface. |
|
Enable a network interface. |
|
Disable a network interface. |
netstat/ss
|
Display listening TCP and UDP ports. |
|
Display listening TCP and UDP ports (using |
|
Display routing table. |
|
Display network statistics. |
Firewall (iptables/firewalld)
iptables (legacy): |
firewalld (modern): |
Troubleshooting
Network Troubleshooting
|
Check network connectivity to a host. |
|
Trace the route packets take to reach a host. |
|
Query DNS servers to resolve domain names. |
|
Capture and analyze network traffic. |
|
Graphical network protocol analyzer. |
|
Combines ping and traceroute functionality. |
System Troubleshooting
|
Display kernel messages (useful for hardware issues). |
|
Query systemd journal logs. |
|
Display memory usage. |
|
Display disk space usage. |
|
Show system uptime and load averages. |
|
Report virtual memory statistics. |
Log Analysis
Log files provide valuable information for troubleshooting and security analysis. Common Log Locations (Linux): |
|
|
|