Linux utilities help to interface with the OS, the server asset and its device stack.
Kernel Information
1 2 3 4 5 |
uname -r # get Linux kernel or OS version uname -a # get all kernel information lsb_release -a # Ubuntu distribution info cat /etc/*-release # Ubuntu distribution with internet help links dpkg -l <package> # Debian info on <package> |
List of Keystroke Bindings
The following command will list all keystroke bindings in place. However, the list is long.
1 |
gsettings list-recursively org.gnome.desktop.wm.keybindings | sort | more # list key bindings |
Clean-up Utilities
1 2 3 4 |
history -c -w ~/.bash_history # clean terminal history rm -f ~/.cache/thumbnails/normal/* # clean the thumbnail cache #1 rm -f ~/.cache/thumbnails/large/* # clean the thumbnail cache #2 rm -r -f ~/.local/share/Trash/files/* # empty trash bin |
File Space Usage
1 2 3 4 |
du -sh * # size of folders (DOOSH!) in PWD (human-readable) du -s * | sort -nk1 # size of folders (sort small to large) du -sh /path/to/folder # size of folders target path du -h --max-depth=1 /path/to/folder # size of all files/folders depth=1 |
Device Utilities
The following commands are Linux utilities that provide information on the device stack for the user’s machine. Additional tables are provided for specific devices that have high frequency interface.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
gnome-system-monitor # launch system monitor df -h # disk usage Disk Usage Analyzer # an Ubuntu app free -t # memory usage (bytes) with total free -gt # memory usage (gigabytes) sudo lspci # list pci buses and devices connected to them sudo lshw -short # comprehensive system info sudo lshw -short -class memory # memory info sudo lshw -class processor # cores and processor info cat /proc/cpuinfo # cores and processors info sudo fdisk -l # List storage devices and partitions sudo lshw -short -class disk # disk drive info sudo lshw -class network # network adapter info sudo lshw -businfo # bus info and device addresses lspci -vnn | grep -1 VGA -A 12 # Data on the graphical card xinput list # list available input devices using ximput utility AlpsPS/2 ALPS DualPoint Stick # track stick device xinput -set-prop "<device>" "Device Enabled" 0 # turn of device; 1 to turn on (look for device name of track stick) cat /var/log/syslog | grep VPN # get VPN connection/error logs |
Sound Commands
1 2 3 4 5 6 7 8 |
aplay /usr/share/sounds/alsa/Front_Center.wav # test sound alsamixer # volume controls (F6 soundcard; MM=mute/hitM key unmute; 00=unmuted) alsactl --file ~/.config/asound.state store # store alsamixer settings alsactl --file ~/.config/asound.state restore # restore saved alsamixer settings gksu pavucontrol # sound device controls (check config tab!!!) HDMI OFF # PulseAdio configuration tab...far right sudo modprobe pcspkr # enable beep beep # generate beep sound (annoying) |
Screen and Monitors
1 2 3 4 5 |
xrandr -q # query monitor settings by display port (DP1-DP6) xrandr --output DP-4 --off # turn off DP-4 (if multiple screens are present) xrandr --output DP-4 --auto # turn on DP-4 (if multiple screens are present) xrandr --output DP-4 --mode 1920x1080 --rate 60 # set screen resolution and refresh rate xrandr --output DP-4 --primary # set DP-4 as primary screen/monitor |
Network Utilities
1 2 3 4 5 6 |
ifconfig # get status of current interfaces...returns IP address for wlan0 iwconfig # verify wifi device ("wlan0") is working sudo iwlist scan # detect nearby wireless networks curl -w '\n' ident.me # get public IP address wget -qO- http://ipecho.net/plain ; echo # get public IP address ./hmaopenvpn.sh # launch HMA VPN with encrypted communication protocols |
Connect to Airplay Time Capsule via Airplay
There are several steps to connect to an Apple time capsule device over Apple Airplay. First, the following command will get the IPV4 address of local devices within range of the machine wifi device:
1 |
nmap -sP 192.168.1.* # get ipv4 address for timecap.lan |
Next, use the following connection command:
1 |
sudo mount -t cifs //<IPV4.address>/<main> /<dir> -o pass=<enter.pwd>,file_mode=0777,dir_mode=0777,sec=ntlm,vers=1.0 |
The command syntax defines several blanks the user must fill in:
- <ipv4.address>: the IP address previously found using the nmap command
- <main>: the main directory on the time capsule device
- <dir> : the empty local directory that display the time capsule files once the device is mounted
For example:
1 |
sudo mount -t cifs //192.168.1.156/Data /mnt -o pass=mypwd,file_mode=0777,dir_mode=0777,sec=ntlm,vers=1.0 |