Ubuntu System Commands

Power Commands
Shutdown computer
Code:
sudo shutdown -h now
reboot computer
Code:
sudo reboot
or
Code:
sudo shutdown -r 0
Network Configuration
Open network configuration file
Code:
sudo nano /etc/network/interfaces
Restart the network:
Code:
sudo /etc/init.d/networking restart
Updates
Get update software list, enter:
Code:
sudo apt-get update
Update software(s) i.e. apply updates:
Code:
sudo apt-get upgrade
Apply kernel upgrade:
Code:
sudo apt-get dist-upgrade
Upgrade individual software called foo type command:
Code:
sudo apt-get install foo
Ping
Code:
Ping –c3 www.google.ie
Clean
To clear the cache you can use either the clean or the auto-clean op for a command-line program called apt-get. The clean command will remove every single cached item, while the auto-clean command only removes cached items that can no longer be downloaded (these items are often unnecessary).
Code:
sudo apt-get clean
List Devices attached:
Code:
sudo lsusb
Checking open ports on Ubuntu
Code:
netstat -anltp | grep "LISTEN"
Enable root account
Code:
sudo passwd root
Chmod for a folder and all of its subfolders and files?
Code:
sudo chmod 755 -R /whatever/your/directory/is

Oscam/Cccam commands
Update cccam.cfg file?
ftp updated cccam.cfg file to /var/config then run command below:
Code:
/var/script/configupdate.sh
Stop oscam:
Code:
sudo killall -9 oscam
Start oscam:
Code:
sudo oscam –b
Log file:
Code:
tail -f /var/log/oscam.log
Edit oscam.server:
Code:
sudo pico /usr/local/etc/oscam.server
Edit oscam.user:
Code:
sudo pico /usr/local/etc/oscam.user
Edit oscam.conf:
Code:
sudo pico /usr/local/etc/oscam.conf
Update CCcam Channel Info
Code:
wget -O /var/etc/CCcam.channelinfo http://tinyurl.com/csmcu44
Update CCcam Providers
Code:
wget -O /var/etc/CCcam.providers http://tinyurl.com/cgo8ogc
Clean oscam/cccam Log Files
Code:
/var/script/LogCleanup.sh