F5 (Tree): See the parent-child relationship between processes. [cite: 1722]
F6 (Sort): Choose to sort by CPU%, Memory%, PID, etc. [cite: 1723]
F9 (Kill): Send a signal (like SIGKILL) to stop a process safely. [cite: 1724]
F10 (Quit): Exit the program. [cite: 1725]
You can use your mouse inside htop to click on columns for sorting or to select specific processes. [cite: 1726]
Vim/Nano
Installation Steps
Most Linux distributions come with at least one of these pre-installed, but here is how to get them (or the full version of Vim) on your system: [cite: 1729]
For Ubuntu, Debian, or Raspberry Pi OS:
sudo apt update
sudo apt install nano vim
For CentOS, RHEL, or Rocky Linux:
sudo dnf install nano vim-enhanced
For Arch Linux:
sudo pacman -S nano vim
How to use them
Using Nano: [cite: 1738]
To open a file: nano filename.txt [cite: 1739]
Save: Press Ctrl + O then Enter. [cite: 1740]
Exit: Press Ctrl + X. [cite: 1741]
Search: Press Ctrl + W. [cite: 1742]
Using Vim: [cite: 1743]
To open a file: vim filename.txt. Vim starts in Normal Mode. [cite: 1744]
Type Text: Press i to enter Insert Mode. [cite: 1745]
Stop Typing: Press Esc to return to Normal Mode. [cite: 1746]
Save & Exit: In Normal Mode, type :wq and hit Enter. [cite: 1747]
Exit without Saving: In Normal Mode, type :q! and hit Enter. [cite: 1748]
11
Net-tools
Installation Steps
For Ubuntu, Debian, Linux Mint, or Kali:
sudo apt update
sudo apt install net-tools
For CentOS, RHEL, Fedora, or Rocky Linux:
sudo dnf install net-tools
For Arch Linux:
sudo pacman -S net-tools
What’s inside net-tools
Once installed, you’ll regain access to these specific commands:
Command
What it does
Modern Replacement (iproute2)
ifconfig
View/Configure network interfaces
ip addr
netstat -tuln
See active ports and connections
ss -tuln
route -n
View the routing table
ip route
arp -a
View the ARP table (IP-to-MAC mapping)
ip neigh
Quick Examples
Check your IP address: Simply type ifconfig. You’ll see your hardware address (MAC), your local IP (inet), and data packet statistics[cite: 1291].
Check listening ports:sudo netstat -plnt. This shows which programs are listening on which ports (e.g., port 80 for HTTP)[cite: 1292].
Check your default gateway:route -n[cite: 1293].
Note: While net-tools is great for muscle memory, it hasn't been actively developed in years. It’s a good idea to eventually get comfortable with the ip command[cite: 1294, 1295].
12
Samba
Step 1: Install Samba
First, ensure your system is up to date and install the Samba package[cite: 1298].
For Ubuntu/Debian:
sudo apt update
sudo apt install samba
For RHEL/CentOS/Fedora:
sudo dnf install samba
Step 2: Create the Shared Directory
You need a specific folder that you want to share. While you can put this anywhere, /samba/ is a common organized choice[cite: 1305, 1306].
Create the folder:
sudo mkdir -p /samba/public
Set permissions: To allow everyone to read and write (adjust as needed for security)[cite: 1308]:
In your GitHub Repo Settings > Pages, scroll to Custom domain.
Type your domain (e.g., yourname.com) and click Save.
Configure Namecheap (DNS Records):
Log in to Namecheap > Domain List > Manage > Advanced DNS.
Add four A Records pointing to GitHub’s IP addresses:
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
Add a CNAME Record:
Host:www
Value:your-username.github.io
Link Domain in GitHub:
Return to your GitHub repository Settings > Pages
Under Custom domain, type your new domain (e.g., example.com) and click Save
Link Domain in GitHub:
Return to your GitHub repository Settings > Pages.
Under Custom domain, type your new domain (e.g., example.com) and click Save.
Enable Security (HTTPS):
Once the domain is verified, check the Enforce HTTPS box. This ensures your site has the "lock" icon in the browser for security.
17
Windows Server
Section 1: Initial Server Setup & Role Installation
Before beginning, ensure your server has a static IP address configured (e.g., 192.168.49.5)[cite: 73].
Open Server Manager: Click Manage > Add Roles and Features[cite: 74].
Select Installation Type: Choose Role-based or feature-based installation and select your server[cite: 75].
Select Server Roles: Check the boxes for:
Active Directory Domain Services (AD DS)[cite: 76].
DHCP Server[cite: 76].
DNS Server[cite: 76].
Note: Click "Add Features" whenever prompted for management tools[cite: 77].
Install: Follow the prompts and click Install[cite: 77].
Promote to Domain Controller: Once installed, click the notification flag and select Promote this server to a domain controller[cite: 78].
Deployment: Select Add a new forest and enter your Root domain name (e.g., mylab.local)[cite: 79].
Configuration: Set a Directory Services Restore Mode (DSRM) password and complete the wizard[cite: 80].
The server will automatically reboot after installation.
18
Section 2: DNS - Configuring Lookup Zones
Active Directory creates Forward Lookup Zones automatically, but you must manually configure the Reverse Lookup Zone.
Configuring Reverse Lookup Zones:
Open DNS Manager: Go to Tools > DNS[cite: 82].
Create New Zone: Right-click Reverse Lookup Zones > New Zone[cite: 83].
Select Primary Zone and check "Store the zone in Active Directory"[cite: 84].
Replication Scope: Select "To all DNS servers running on domain controllers in this domain"[cite: 85].
Select IPv4 Reverse Lookup Zone[cite: 86].
Network ID: Enter the first three octets of your network (e.g., 192.168.49)[cite: 86].
Dynamic Updates: Choose Allow only secure dynamic updates[cite: 87].
Add Pointer (PTR) Record:
Right-click your new zone > New Pointer (PTR)[cite: 87].
Browse to find your Host (A) record in the Forward Lookup Zone to map the IP to the Hostname[cite: 88].
Final DNS Tweak: In your Ethernet adapter settings, change the Preferred DNS server from 127.0.0.1 to the server's actual static IP (192.168.49.5)[cite: 89].