This will give you a short summary of useful commands that can be executed at the command line in Raspbmc either by an attached keyboard or via an SSH connection.
Shown as follows are some useful commands and a description of the task they achieve. It should be noted that this is not a comprehensive list of commands.
Description of command |
Command to run on Raspbmc |
---|---|
Exit to a command line |
Select the power icon in XBMC, select Exit, and press Escape on your keyboard |
Start XBMC |
sudo initctl start xbmc
|
Stop XBMC |
sudo initctl stop xbmc
|
Reboot your Raspberry Pi |
sudo reboot
|
Check your system log and view it in a scrollable manner |
less /var/log/syslog
|
Upload several logs for diagnostics to Pastebin |
helpme
|
Remove XBMC Nightly Build from startup and revert to the default XBMC build instead |
rm /home/pi/.xbmc-current |
Check free space available |
df -h |
Check how long Raspberry Pi has been on for |
uptime |
Delete a file |
rm filename |
Copy a file |
cp filename newname |
Move a file |
mv /path/to/filename/path/to/newfilename |
Show the contents of a directory |
ls -llh /some/folder (substitute) |
Execute a command with root privileges |
sudo command |
View CPU usage |
top |
View memory information |
free -m |
Install a package via apt |
sudo apt-get update sudo apt-get install packagename (substitute packagename) |
Remove a package previously installed via apt |
sudo apt-get remove packagename |
Edit a file |
nano filename |
Save a file after editing with nano |
CTRL + O then press Enter to save CTRL + X to exit |
cd /home/pi/.xbmc/userdata | |
Manually disable Raspbmc updates |
touch /home/pi/.noupgrades |
Manually enable Raspbmc updates |
rm /home/pi/.noupgrades |
Change the password |
passwd |
Change the hostname |
hostname newname (substitute newname) |
Disable Raspbmc updates via command line |
touch /home/pi/.noupgrades |
Force a Raspbmc kernel update |
sudo rm /scripts/upd_hist/kver |
Force an XBMC update |
sudo rm /scripts/upd_hist/xbmcver |