Skip to content

Instantly share code, notes, and snippets.

@bburdiliak
Last active August 29, 2018 07:13
Show Gist options
  • Save bburdiliak/3925fede374d859abf278ba088c113c0 to your computer and use it in GitHub Desktop.
Save bburdiliak/3925fede374d859abf278ba088c113c0 to your computer and use it in GitHub Desktop.
Useful commands
## Disk management
# how big is your apt cache:
du -sh /var/cache/apt/archives
# remove old kernels (if no longer required)
sudo apt-get autoremove --purge
# list all directories and sort by size
du -m --max-depth 1 | sort -rn
## Firewall
# open port for TCP and UDP packets
sudo ufw allow 19001
## Devices & Power Mangement
# Ubuntu wakes up immediately after suspend
# find out devices in awake state
acpitool -w
# You might see output like the following:
# Device S-state Status Sysfs node
# ---------------------------------------
# 1. P0P1 S4 *disabled
# 2. GLAN S4 *disabled
# 3. XHC S4 *enabled
# To disable ‘XHC’, do:
echo 'XHC' > /proc/acpi/wakeup
#Typical suspects are USB devices. To find out the USB devices in your system, do:
lspci | grep USB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment