Thursday, January 24, 2013

Linux commands & stuff

Since I am not to used to using gnu/linux, here is a list of some commands/programs that are used often:

apt-get install <xxx> - install a new package
apt-get update - update the package list
apt-get upgrade - install new version of your packages
ls - list files/dirs
mv - moves a file
cp - copies a file
rn - renames a file
startx - start X-session (desktop)
nano - simple editor (ctrl+O = save, ctrl+X = close)
groups - print the groups a user is in
chmod - Changes the permission of a file

and many more...
A lot of times problems occure due to permission issues, so try "sudo" infront of the command before becoming furious. Also make sure that you have the rights to read/write a file, otherwise it won´t work.

Shutdown & restart
sudo shutdown -h now - shutsdown the raspberry pi now
sudo shutdown -r now - restarts the raspberry pi now
As suggested here: it might be a good idea to leave the rasperry pi connected to the power supply cable and use a plug board with a power switch - to limit the number of insert/disconnect cycles. If you are a little princess.

Config files & services
In linux most of settings/programs can be configured by editing their specific config files. After changing the config files you have to restart the pi or restart the specific service. This can be achieved like this:
sudo service <serviceName> restart/stop/start

No comments: