# Check for Package Updates

sudo apt-get update

sudo apt-get upgrade

# Switch to Root
# Note: Switch back out of root: exit
sudo -i
# Note: Switch to root but with Shell specific settings
sudo -s

# Launch in Background
# Add & to end of command

eg.
./dispmanx_vnc-master/dispman_vncserver&

# Shut Down Now
sudo shutdown -h now


# List Processes

ps -ef

ps aux

# Kill Process

kill [PID]

# Send current process to background

[ctrl+z]

# List Mount Points (Drives)
df

# List installed Packages

dpkg --get-selections

# List (specific) installed Packages, eg. Cron and Unrar

dpkg --get-selections | grep -E 'cron|unrar'

# Uninstall installed package

sudo apt-get remove [packagename]

# Completely remove package and associated configuration files

sudo apt-get purge [packagename]

# List Cron Jobs
crontab -l

# Edit Cron manually
crontab -e

# Check enabled services:
systemctl list-unit-files | grep enabled

# OSMC Enable Root Account:
sudo passwd root

# OSMC Disable Root Account:
sudo passwd -l root

# Restart Service (eg. ssh)
sudo service ssh restart

# Check Linux Version
cat /etc/issue
Raspbian GNU/Linux 9 \n \l

cat /etc/debian_version
9.4

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

# Set Time Zone
tzselect

# Check Time Date/Zone
timedatectl

# Force TimeZone... Edit ~/.profile, adding the following line:
TZ='Australia/Sydney'; export TZ

# Check NTP Table
ntpq -cpeers

# Fix WiFi NTP Check...

Modify /etc/rc.local, adding the following before the line "exit 0"
/sbin/iptables -t mangle -I POSTROUTING 1 -o wlan0 -p udp --dport 123 -j TOS --set-tos 0x00

Leave a Reply

Your email address will not be published. Required fields are marked *