Sunday, February 02, 2014

Debian & Raspbian for dummies

Start the configuration interface:
   raspi-config

To execute some commands You need administrative rights. You do that with "sudo". Example: see the IP and network for the main ETHernet interface:
    sudo ifconfig eth0

Switch to administrative user to avoid the need to type in sudo all the time:
   sudo -i

Update the system (you need administrative rights, see above):
   apt-get update; apt-get upgrade

Edit a configuration file (save with CTRL+X ) :
   nano /etc/hosts.allow

Search online for software, for example a media player:
   apt-cache search media

You'll get 1000 results, now narrow them down with filtering (| is the pipe sign):
   apt-cache search media | grep player (for narrowing down results)
   apt-cache search media | more (for listing the results in a program which allows scrolling)

You have now found what you seek. Install VLC
   apt-get install vlc

Kill the X-server if you want to go console-only: CTRL+BACKSPACE
When in console mode you might want to have a manual on one "page" and execute stuff on another "page" : Open a new console window with ALT+2 , ALT+3. Switch back to the first with ALT+1

Find a file when you know its name: "find" command , / is the root filesystem
   find / -name hosts.allow
Find a file when you only know parts of the filename:
   find / | grep hosts

Shutdown system:
   poweroff

Reboot system:
   reboot

Look at the system logs - change to the log directory, then show one:
  cd /var/log ; cat dmesg
  cat /var/log/auth.log

Raspberry Pi
----------------

Install software for camera monitoring
   apt-get install motion
see http://en.wikipedia.org/wiki/Motion_(surveillance_software) for more info and documentation