- Finding largest files on a Linux system
sudo find /home/ -type f -exec du -b {} + 2>/dev/null | sort -rh | head -20
- Ubuntu RDP Problem
#!/bin/bash
# =============================================================================
# Ultimate All-in-One xRDP Installer for Ubuntu 24.04 (GNOME/Wayland)
# → Removes broken repo version completely
# → Installs latest xRDP via c-nergy script in CUSTOM mode (-c) + sound (-s)
# → Fully working: clipboard, drives, sound, smooth performance, no black screen
# Tested and working perfectly on Ubuntu 24.04.3 as of Nov 29, 2025
# =============================================================================
set -e # Exit on any error
echo "=== Stopping and completely removing any old/broken xRDP installation ==="
sudo systemctl stop xrdp xrdp-sesman 2>/dev/null || true
sudo apt purge -y xrdp xorgxrdp pipewire-module-xrdp libpipewire-0.3-modules-xrdp libxrdp* 2>/dev/null || true
sudo rm -rf /etc/xrdp /var/run/xrdp* /etc/polkit-1/localauthority/50-local.d/*xrdp* 2>/dev/null || true
sudo deluser xrdp ssl-cert 2>/dev/null || true
sudo apt autoremove -y
echo "=== Disabling built-in GNOME Remote Desktop (it conflicts) ==="
gsettings set org.gnome.desktop.remote-desktop.rdp enable false || true
systemctl --user stop gnome-remote-desktop.service 2>/dev/null || true
systemctl --user mask gnome-remote-desktop.service 2>/dev/null || true
echo "=== Downloading latest c-nergy xrdp-installer v1.5.5 (Oct 31 2025) ==="
wget -q --show-progress -O xrdp-installer-1.5.5.zip https://www.c-nergy.be/downloads/xRDP/xrdp-installer-1.5.5.zip
echo "=== Extracting ==="
unzip -o xrdp-installer-1.5.5.zip
echo "=== Making executable ==="
chmod +x xrdp-installer-1.5.5.sh
echo "=== Running installer in CUSTOM mode with sound redirection (-c -s) ==="
echo " This will compile the absolute latest xrdp (0.10.x develop) – takes 5–10 min"
echo " Automatically selecting Ubuntu GNOME (option 1) when asked"
# Auto-answer "1" for the desktop selection prompt (ubuntu = GNOME)
printf "1\n" | ./xrdp-installer-1.5.5.sh -c -s
echo "=== Enabling and starting xRDP service ==="
sudo systemctl enable --now xrdp
echo "=== Opening firewall port (if ufw is active) ==="
sudo ufw allow 3389/tcp 2>/dev/null || true
echo ""
echo "╔══════════════════════════════════════════════════════════════════════════╗"
echo "║ INSTALLATION COMPLETED SUCCESSFULLY! ║"
echo "║ ║"
echo "║ → Reboot is HIGHLY recommended (required for sound to work perfectly) ║"
echo "║ Run: sudo reboot ║"
echo "║ ║"
echo "║ → After reboot, connect from Windows RDP (mstsc) to this machine's IP ║"
echo "║ You will get the blue xrdp login screen → use your Ubuntu username ║"
echo "║ and password → full desktop with sound, clipboard, drives, etc. ║"
echo "║ ║"
echo "║ This is the only setup that actually works reliably on Ubuntu 24.04 ║"
echo "╚══════════════════════════════════════════════════════════════════════════╝"
- Server Fan
sudo nano Startup.sh
#!/bin/bash
modprobe -r kvm_intel kvm
ipmitool -H 192.168.99.20 -U USERID -P PASSW0RD raw 0x3a 0x07 0x03 0x00 0x01
ipmitool -H 192.168.99.20 -U USERID -P PASSW0RD raw 0x3a 0x07 0x01 0x00 0x01
ipmitool -H 192.168.99.20 -U USERID -P PASSW0RD raw 0x3a 0x07 0x02 0x00 0x01
sudo chmod +x Startup.sh
sudo nano /etc/systemd/system/Startup.service
[Unit]
Description=Startup Script
After=network.target
[Service]
ExecStart=/usr/local/bin/Startup.sh
Type=simple
User=root
Restart=always
[Install]
WantedBy=multi-user.target # Or default.target
sudo systemctl daemon-reload
sudo systemctl enable Startup.service
sudo systemctl start Startup.service
# Anotehr Way [Not reliable]
crontab -e
@reboot /path/to/your_script.sh
- External Hard Drive Issues
sudo ntfsfix -d /dev/sdb1
- Virtualbox
- Nested VM grayed
VBoxManage list vms
VBoxManage modifyvm "Your_VM_Name" --nested-hw-virt on
- Logging
nano ~/.zshrc
# Add this
if [ -z "$SCRIPT_LOGGING" ]; then
export SCRIPT_LOGGING=1
LOG_DIR="$HOME/Terminal_logs"
mkdir -p "$LOG_DIR"
LOG_FILE="$LOG_DIR/session_$(date +%Y-%m-%d_%H-%M-%S).log"
echo "[*] Auto-logging session to: $LOG_FILE"
script -q -a -f "$LOG_FILE"
exit
fi
source ~/.zshrc
- Copy Large File
cat file.txt | xclip -selection clipboard