LINUX OPERATING SYSTEM
The following notes explain some of the options open to new-comers to the Raspberry Pi minature computer.
The Raspberry Pi uses the Linux OperatingSytem (OS) and its microprocessor is a member of the ARM family. This processor has
a machine code based on the principle of 'Reduced Instruction Set'
(RISC), when compared with with other processors , e.g Intel's various family members.
Raspberry Pi Foundation please see link
The Raspberry Pi may be purchased on-line from:-
Modmypi Please see link
Element14 please see link
RS Components please see link
Notes for Saturday 4th January 2014
Once Raspberry Pi has been connected to the internet
the correct time is automatically set
Substitutions ie short cuts are best made using
the definition (see alias, below)
Normally cp will copy files from SOURCE TO DEST
However, if we wish to include all directories
in the copy, we must use cp -R SOURCE DEST
name () (command)
eg rbt () (sudo reboot) will reboot the system
To make an app work at every session, enter
the required bash command at the end of the
This file is found in the dir 'etc'.
cd /etc;ls You must have root permission to
alter the contents this file.
The leafpad editor is in the folder - Applications
There is path to it directly from Raspberrypi folder
To make a file executable where appropriate use
To make a file readable and writeable use
To close a Window can use Alt+F4
Whilst in LX-Terminal system you can
return to the Desktop by using 'exit'
note: this command is case sensitive
Partition table can be viewed by typing
sudo fdisk -l (Note option is lower case 'L'
and Not -1!!)
To make a
Useful batch type file can be built as follows:-
Open a new named
no terminator statement is required
Note: where the syntax $(
there is no space between the '$' an the '('
When assembling code which enables the vfp
coprocessor, the assembler 'as' doesn't work
Use the gcc compiler instead. The format is:-
gcc -g -o
In order to read a pdf file -
To get block size use:-
ls -s --size or simply ls -s
In order to remove a directory, use the command
note that in the 'c' statement'printf', if a variable is to be printed
with a description string, the variable will be printed at the exact position
of the printing tag %
printf("The name of the input file is :- %s", argv[i]
full details of file systems in use, including media files
the later will show from any usb 'plug-ins'
must use super-visor permission:-
Note: The default version of python is python2.7.
However the latest ver is python3.2
In order see the modules available, it is necessary to
A list of modules is then available by doing an ls
here. Tkinter (dir) then shows
In order to keep the current tkinter running
the last instruction in the module listing
otherwise the graphics window will collapse before
it is seen!
RUNNING PYTHON PROJECTS
Care must be taken when coding python projects
e.g. tkinter is not available on python2 and
pygame.py is not available on python3 !
IMPORTING NEW MODULES
Importing new modules into python is not
as straight-forward as it may seem. This is
because there are several version of python
all with different libraries.
e.g. importing 'livewires' from py3e_software
it is necessary to make a new directory
'livewires' in the python2.7 library
use sudo mkdir here.
Then go back and sudo cp the contents of the
livewires folder into the new lib folder
'livewires'. This necessay as we also need
'pygame'. Then it all works!
The output is of the form:
'png' is an image format. In order to see
the image, needs must find the 'png'
file in file manager mode and click on it
GIMP can also be used to show these images
Scope of 'find' may be increased by using a
depth parameter e.g. find -O2
Apps which have been installed (during use)
are stored in usr/bin directory.
Apps which were installed on Debian originally
are stored in bin directory
Apps which were compiled by the user
are stored usr/local/bin directory
This command gives details of local area network
If you know the four digit IP address of a particular web-site
eg Google.com or 220.127.116.11
The IP address of the internet provider is the Gateway
AUXILLARY FILE DESIGNATION
When a 'batch' type file is executed,
the file names appearing on the command line are
designated as follows:-
REMOVAL AND REINSTALLING FILES IN DIR /local/bin
If an exxecutable file in above dir has been mistakenly
installed in a dir, rm the file in that dir.
Then change to the desired dir and
PRESERVING THE ORIGINAL TXT OF 'EXE' FILES
Once exe files are enabled, they cannot be re-edited
copied or changed. This problem can be over-ridden
by making a copy of the original txt before processing
eg :- cp $0 $0.arch
The *.arch file can then be developed further
if required, without having to re type the code
The number of ping shots may be spcified:
New Raspberry Pi model 2 is now released. Full details on:- please see link