KEMBAR78
Introduction to Linux with Focus on Raspberry Pi | PDF
Introduction to Linux with Focus on RPI
David B. Horvath, CCP, MS, KB3RIJ
The Phil-Mont Mobile Radio Club
Giant Supermarket, Willow Grove, PA
April 9, 2025
2
Contact Information
The Author can be contacted at:
504 Longbotham Drive, Aston PA 19014-2502, USA
Phone: 1-610-859-8826
Email: dhorvath@cobs.com
Web: http://www.cobs.com/
LinkedIn: http://www.linkedin.com/in/dbhorvath
All trademarks and servicemarks are the
property of their respective owners.
Copyright © 2025, David B. Horvath, CCP — All Rights Reserved
3
My Background
• David is an IT Professional who has worked with various platforms
since the 1980’s with a variety of development and analysis tools.
• He has presented at various conferences, workshops and seminars in
Australia, France, the US, Canada, and even Oxford England (about
the British Author Nevil Shute).
• He holds an undergraduate degree in Computer and Information
Sciences from Temple University, a Masters in Organizational
Dynamics from UPENN, and recently completed a Masters in Data
Sciences.
• Most of his career has been in consulting (although he has been in-
house most of this century) in the Philadelphia PA area. He is
currently in Data Analytics "Engineering" at a Regional Bank.
• He has several books to his credit (none Ham related) and is an
Adjunct Instructor covering IT topics.
• Third Class Radio Telephone ca 1978 operating on WHHS
• General Amateur 2008 but didn’t really get active until 2020
4
Abstract
• History of Raspberry PI
• History of UNIX and Linux
• Backing up and Moving Files to/from the Raspberry PI
• Basic file and directory actions
• Moving files to/from Raspberry PI
• Remote access to Raspbery PI
• Important directories and devices
• Updating your applications, tools, and operating system
5
History of Raspberry PI
• Initial Prototype in 2006
• Project in 2012 to help school children learn about computers
• BBC Micro by Acorn Computers was under $850 (2025 USD)
• Making the RPI greater than an order of Magnitude cheaper
• Tend to be less powerful than home PC and many mobile devices
• Boots and runs off SD chip
• USB Ports along with (varies) Ethernet, WiFi, Bluetooth, HDMI, audio
• GPIO Header hardware interfaces allowing PWM, binary, A/D)
• Video, keyboard, and mouse can be “headless”
• Low Power Consumption (fed via USB port, AC or battery)
• Runs Linux, BSD, Android, limited MS Windows, etc.!
6
History of UNIX and Linux
• What is Linux?
• How is it pronounced?
• Lynn-icks
• Line-icks
• Lean-icks
• What is it?
• An operating system like UNIX
• Can be Free
• User Supported
• Includes GNU
• Has no commercially copyrighted code
• Versions are know as “Distros” (Distributions)
7
History of UNIX and Linux
• What is Linux?
• Linux is really the “kernel”
• What is GNU?
• “GNU is Not UNIX” — replicates UNIX tools and utilities
• Free Software Foundation
• Governed by “copyleft” (GPL) instead of “copyright”
• Why would you want Linux?
• Freely available and easily modifiable
• More efficient that Microsoft’s Windows
• Is not Microsoft’s 
• Looks and Feels like UNIX
• The fun of exploration (is also “sexy”)
• Robust
• It is a “Flavor” of UNIX
8
History of UNIX and Linux
• What is UNIX?
• UNIX is a character-based server oriented operating system
• Originally developed at AT&T Bell Labs
• Was an internal project never intended for commercial sale
• Originally given away for free! But is now commercial
• The word “UNIX” is trademarked
• Is a specific operating system
• Is a generic term
• “Flavors” include AIX, Z/OS, SunOS/Solaris, HP-UX,, Linux, BSD, Apple Mac
OS, and others.
• Most replaced by Linux now
9
History of UNIX and Linux
• What is UNIX?
• UNIX is a programmers’ environment
• Is very flexible, extensible, and consists of many small tools that are
readily combined. WGPCGR
• Gained popularity in colleges (who got it free from AT&T)
• Grew from user support (notice a trend?)
• Available on just about every computer system made today!
• Very transportable skill
10
Backing up and Moving Files to/from the Raspberry PI
• There are several main methods
• Full system (back up the SD chip):
https://sourceforge.net/projects/win32diskimager/files/Archive/Win32DiskI
mager-0.9.5-install.exe/download
• Win32DiskImager-0.9.5-install.exe
• Included with Allstar distribution
• Allows you to read/write entire chip (all filesystems)
11
Backing up and Moving Files to/from the Raspberry PI
• There are several main methods (continued)
• Within the Application
12
Backing up and Moving Files to/from the Raspberry PI
• There are several main methods (continued)
• Individual Files: sftp to your PC – MobaXterm or Windows or …
13
Backing up and Moving Files to/from the Raspberry PI
• There are several main methods (continued)
• Blocks of Files: tar, zip, sftp to your PC
• ‘gzip -c /var/log/*log > zippedlogs’
• ‘tar -cvf tarlogs /var/log/*log’
• Thumb Drive
• Insert thumb drive
• Determine where it is mounted (will usually self-mount)
• ‘more /etc/fstab’
• ‘df –h’
• Create the directory and copy to it
• ‘sudo mkdir xxx’
• ‘sudo cp ~/.* xxx/’
• Hybrid with USB SD card reader
14
Basic file and directory actions
• If you are familiar with old MS/DOS much of this will be familiar
• Lots of differences though
• Broken down into the following areas:
• Directory Navigation
• Finding Files
• Manipulating Files
• Space Usage and Availability
• Command History (Remember: the best programmers are lazy)
• System Commands
• More Information
• Introduction to Editing (if time allows)
15
Directory navigation
• You will find UNIX directory structure very familiar
• Windows shares many similarities include tree-metaphor structure
• Use / instead of Windows’ 
• No drive letters
• All disks are attached to the main directory structure (“mounted”)
• DOS 3.1 – 6 included the ‘join’ command Cygwin is a special case
• Directory Navigation
• ‘cd’ – change directory
• ‘cd’ with no parameters – change to home directory
• ‘cd -’ – change to previous directory (where you were before)
• ‘pwd’ – display the current directory (Windows ‘cd’ does this)
16
Directory navigation
• Absolute, Relative, and Home-relative Forms
• Absolute specifies the entire directory path
• cd /home/dhorvath/subdirectory/subsub/etc
• Relative specifies the directory path relative to the current directory
• assuming current directory is /home/dhorvath
• cd subdirectory/subsub/etc
• cd ../dhorvath/subdirectory/subsub/etc
• cd .. – takes you up one directory level, can be repeated
• “.” – current directory (handy when a command needs a directory and you’re
already there)
17
Directory navigation
• Absolute, Relative, and Home-relative Forms
• You can also specify via the home directory
• cd ~/subdirectory/subsub/etc – relative to my home directory
• cd ~userid/subdirectory/etc – relative to userid’s home directory
• Directory forms can be used with any command (not just ‘cd’).
• Remember that case matters
• Enclose path in “” if it contains special characters or spaces
• Can cheat and use wild cards if you’re lazy
18
Finding files
• ‘ls’ is the primary command for looking at files
• Many options are available
• -a – show all files; by default, files that begin with “.” are “hidden”
• -l – long display showing full information
• -1 – list in one column
• -t – sort by time
• -r – reversed (used with -t)
• -R – recurse through subdirectories
• Watch for “Arg list too long” – your wildcard list got too large
• Windows requires individual programs to expand wildcards
• UNIX shell expands wildcards “on the command line”
19
Finding files
• ‘find’ is much more complex than ls with many more features
• Too many to cover here!
• Form is ‘find DIRECTORY –name “wildcard*string” ACTION
• DIRECTORY is where to search (and all subdirectories)
• -name “wildcard*string” – files to search for
• ACTION is one of many options including –print, -ls, and –exec
• One use is to get around “Arg list too long” error
• Often used to find a specific file if you have no idea where it is
• Can execute specific commands on each file found
20
Finding files
• ‘grep’ – this is the command when you want to search the contents of
a file
• General form is ‘grep OPTIONS “search string” file_name_wildcarded’
• Common OPTIONS
• -v (invert match – show lines that don’t match)
• -i (case insensitive search)
• -H (show file names)
• -n (show line number)
• -r (recurse through subdirectories)
• “search string” includes regular expressions
• Entire books have been written to explain regular expressions!
• ^ (beginning of line)
• $ (end of line)
• . (any single character)
• [ABCabc] (single character that matches any of A, B, C, a, b, c)
21
Manipulating files
• Literally hundreds of commands
• ‘cp’ – copy file contents to a new name
• ‘mv’ – move file to a new directory or name
• ‘cat’ – concatenate file onto another or to your screen
• ‘more’, ‘less’, ‘pg’ – display contents of file one screen at a time
• ‘head’ – show first 10 lines of a file
• ‘tail’ – show last 10 lines of a file
• ‘rm’ – remove file
• ‘mkdir’ and ‘rmdir’ – create and remove directories
22
Space Usage and Availability
• In support roles, we constantly are faced with questions about space:
• “how much is used?”
• “how much is left?”
• ‘ls -l’ will tell you how big a specific file is
-r-xr-x--- 1 dhorvath Users 324 Feb 25 2009 logging.properties
dr-xr-x--- 4 dhorvath Users 16384 Aug 25 23:35 mingw
• Size shown for directories is the space for the directory itself, not the
files contained within
• Because an individual file can have multiple directory entries (called
links), you can’t just add up the sizes of the files.
23
Space Usage and Availability
• ‘du’ will tell you how much space is used by all the files in a directory
(and any subdirectories)
$ du
0 ./Process/2009-01-02_bill/final
0 ./Process/2009-01-02_bill
40 ./Process/error_processed_files
0 ./Process/misc
1121952 ./Process
• And is smart enough to handle linked files
• You can specify the directory to determine usage
24
Space Usage and Availability
• ‘df’ will tell you how much space is used/available in a file system
• With no options, will show all file systems
• ‘df .’ will show for the file system that holds the current directory
$ df .
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/fslv01 1101004800 144043800 87% 104805 1% /ingmnt/ifmdata
• inode are the number of files the file system can hold
• I will often use -m or -g options to get values in Megabytes or Gigabytes
25
Korn shell and GNU Forms of History
• Programmers are lazy and UNIX/Linux helps!
• Many tasks are repetitive so using history helps
• vi and emacs modes
• Enable with ‘set -o vi’ or ‘set -o emacs’
• Modes are mutually exclusive
• Allows the use of basic editor navigation and search commands
• Demonstrate
• “PC DOS” mode under Cygwin
• Shows as emacs mode
• Really behaves like the old doskey mode
26
Korn shell and GNU Forms of History
• History commands
• ‘fc’ – “Fix Command” – list or recall commands
• fc –s string
• fc –l
• ‘history’ – command history, often an alias for ‘fc -l’
27
Editing
• ‘nano’ – easy editor that was originally named “TIP is not PICO”
(another easy editor)
• ‘vi’ – Visual display editor is available absolutely everywhere, ‘vim’,
which stands for ViIMproved is an updated version
• ‘emacs’ – stands for Editor MACroS originally for TECO (Text Editor
and Corrector for DEC Systems) by Richard M Stallman in 1976. Very
extensible
• ‘ed’ – text editor designed for print terminals
• ‘sed’ – stream editor much like ‘ed’ but designed for automated
manipulation.
• Note the tip sheets for nano, vi/vim, and emacs
28
Editing
29
System Commands
• ‘sudo’ – super user do (run as administrator)
• ‘sudo raspi-config’ – not available with allstar install, configures RPi
30
System Commands
• ‘sudo shutdown -h now’ – shut down system immediately
• ‘sudo reboot’ – reboot the system
• ‘sudo apt-get’ – APT package handling utility
• top
• ps –ef
31
More Information
• Quick Overview of Important Commands
• ‘man’ – always your friend!
• ‘command -?’ – quick summary of that command
• ‘command --help’ – GNU style quick summary
• Other information sources
• Obviously google
• RPI Magazine -- https://store.rpipress.cc/collections/latest-
releases/products/raspberry-pi-official-magazine-152
32
Remote access to Raspbery PI
• Access:
• Putty:
• MobaXterm
• Cygwin WinX Server
• Windows ssh, sftp
• TeamViewer
33
Important directories and devices
• / -- root directory
• /home – general directory for users
• /home/YOURID
• ~YOURID or just ~
• /home/MYID
• ~MYID
• /etc – configuration files
• /usr
• /usr/bin
• /usr/local
• /usr/local/bin
• /proc – information about processor
• /bin
• /dev -- devices
• /dev/null
• /dev/YOURDEVICE
34
Updating your applications, tools, and operating system
• Several different methods
• Via the Application (like Stratux)
• Probably least common form
• Fresh Install – new chip
• Via apt-get commands under Linux
• ‘sudo apt-get check’ – check on updates
• ‘sudo apt-get update’ – retrieve list of available packages
• ‘sudo apt-get upgrade’ – perform any necessary upgrades
• Can be dangerous
• ‘apt’ is a newer version of ‘apt-get’ but may not be in your distro.
35
Wrap Up
Questions
and
Answers
?! ?!
?! ?!
?
? ?
?
!
!
!
!
36
Introduction to Linux with Focus on RPI
The Author can be contacted at:
David B. Horvath, CCP
504 Longbotham Drive, Aston PA 19014-2502, USA
Phone: 1-610-859-8826
Email: dhorvath@cobs.com
Web: http://www.cobs.com/
LI: http://www.linkedin.com/in/dbhorvath
37
Introduction to Linux with Focus on RPI
• It is all about choices
38
References
• https://raspberrytips.com/raspberry-pi-history/
• https://www.in2013dollars.com/uk/inflation/2006?amount=350
• https://www.cam.ac.uk/stories/raspberrypi
• https://en.wikipedia.org/wiki/Raspberry_Pi
• https://xkcd.com/378/
• https://www.cam.ac.uk/stories/raspberrypi
• https://www.techspot.com/article/531-eben-upton-interview/
• https://www.geeksforgeeks.org/how-to-upgrade-raspberry-pi-os/
• GPIO PINS https://pinout.xyz/
• SPI/I2C - https://en.wikipedia.org/wiki/Serial_Peripheral_Interface
https://en.wikipedia.org/wiki/I%C2%B2C
• Linux Cheat sheet https://phoenixnap.com/kb/linux-commands-cheat-
sheet
39
References
• https://sourceforge.net/projects/win32diskimager/files/Archive/Win32DiskI
mager-0.9.5-install.exe/download
• https://raspberrystreet.com/learn/how-to-backup-raspberrypi-sdcard
• https://www.putty.org/
• https://mobaxterm.mobatek.net/download-home-edition.htm
• https://x.cygwin.com/
• VIM cheat sheet: https://github.com/sk3pp3r/cheat-sheet-
pdf/blob/master/pdf/vim-cheat-sheet.pdf
• NANO Cheat Sheet https://www.nano-
editor.org/dist/latest/cheatsheet.html
• GNU emacs Cheat Sheet
https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf
40
Wrap Up for Real
Questions
and
Answers
?! ?!
?! ?!
?
? ?
?
!
!
!
!

Introduction to Linux with Focus on Raspberry Pi

  • 1.
    Introduction to Linuxwith Focus on RPI David B. Horvath, CCP, MS, KB3RIJ The Phil-Mont Mobile Radio Club Giant Supermarket, Willow Grove, PA April 9, 2025
  • 2.
    2 Contact Information The Authorcan be contacted at: 504 Longbotham Drive, Aston PA 19014-2502, USA Phone: 1-610-859-8826 Email: dhorvath@cobs.com Web: http://www.cobs.com/ LinkedIn: http://www.linkedin.com/in/dbhorvath All trademarks and servicemarks are the property of their respective owners. Copyright © 2025, David B. Horvath, CCP — All Rights Reserved
  • 3.
    3 My Background • Davidis an IT Professional who has worked with various platforms since the 1980’s with a variety of development and analysis tools. • He has presented at various conferences, workshops and seminars in Australia, France, the US, Canada, and even Oxford England (about the British Author Nevil Shute). • He holds an undergraduate degree in Computer and Information Sciences from Temple University, a Masters in Organizational Dynamics from UPENN, and recently completed a Masters in Data Sciences. • Most of his career has been in consulting (although he has been in- house most of this century) in the Philadelphia PA area. He is currently in Data Analytics "Engineering" at a Regional Bank. • He has several books to his credit (none Ham related) and is an Adjunct Instructor covering IT topics. • Third Class Radio Telephone ca 1978 operating on WHHS • General Amateur 2008 but didn’t really get active until 2020
  • 4.
    4 Abstract • History ofRaspberry PI • History of UNIX and Linux • Backing up and Moving Files to/from the Raspberry PI • Basic file and directory actions • Moving files to/from Raspberry PI • Remote access to Raspbery PI • Important directories and devices • Updating your applications, tools, and operating system
  • 5.
    5 History of RaspberryPI • Initial Prototype in 2006 • Project in 2012 to help school children learn about computers • BBC Micro by Acorn Computers was under $850 (2025 USD) • Making the RPI greater than an order of Magnitude cheaper • Tend to be less powerful than home PC and many mobile devices • Boots and runs off SD chip • USB Ports along with (varies) Ethernet, WiFi, Bluetooth, HDMI, audio • GPIO Header hardware interfaces allowing PWM, binary, A/D) • Video, keyboard, and mouse can be “headless” • Low Power Consumption (fed via USB port, AC or battery) • Runs Linux, BSD, Android, limited MS Windows, etc.!
  • 6.
    6 History of UNIXand Linux • What is Linux? • How is it pronounced? • Lynn-icks • Line-icks • Lean-icks • What is it? • An operating system like UNIX • Can be Free • User Supported • Includes GNU • Has no commercially copyrighted code • Versions are know as “Distros” (Distributions)
  • 7.
    7 History of UNIXand Linux • What is Linux? • Linux is really the “kernel” • What is GNU? • “GNU is Not UNIX” — replicates UNIX tools and utilities • Free Software Foundation • Governed by “copyleft” (GPL) instead of “copyright” • Why would you want Linux? • Freely available and easily modifiable • More efficient that Microsoft’s Windows • Is not Microsoft’s  • Looks and Feels like UNIX • The fun of exploration (is also “sexy”) • Robust • It is a “Flavor” of UNIX
  • 8.
    8 History of UNIXand Linux • What is UNIX? • UNIX is a character-based server oriented operating system • Originally developed at AT&T Bell Labs • Was an internal project never intended for commercial sale • Originally given away for free! But is now commercial • The word “UNIX” is trademarked • Is a specific operating system • Is a generic term • “Flavors” include AIX, Z/OS, SunOS/Solaris, HP-UX,, Linux, BSD, Apple Mac OS, and others. • Most replaced by Linux now
  • 9.
    9 History of UNIXand Linux • What is UNIX? • UNIX is a programmers’ environment • Is very flexible, extensible, and consists of many small tools that are readily combined. WGPCGR • Gained popularity in colleges (who got it free from AT&T) • Grew from user support (notice a trend?) • Available on just about every computer system made today! • Very transportable skill
  • 10.
    10 Backing up andMoving Files to/from the Raspberry PI • There are several main methods • Full system (back up the SD chip): https://sourceforge.net/projects/win32diskimager/files/Archive/Win32DiskI mager-0.9.5-install.exe/download • Win32DiskImager-0.9.5-install.exe • Included with Allstar distribution • Allows you to read/write entire chip (all filesystems)
  • 11.
    11 Backing up andMoving Files to/from the Raspberry PI • There are several main methods (continued) • Within the Application
  • 12.
    12 Backing up andMoving Files to/from the Raspberry PI • There are several main methods (continued) • Individual Files: sftp to your PC – MobaXterm or Windows or …
  • 13.
    13 Backing up andMoving Files to/from the Raspberry PI • There are several main methods (continued) • Blocks of Files: tar, zip, sftp to your PC • ‘gzip -c /var/log/*log > zippedlogs’ • ‘tar -cvf tarlogs /var/log/*log’ • Thumb Drive • Insert thumb drive • Determine where it is mounted (will usually self-mount) • ‘more /etc/fstab’ • ‘df –h’ • Create the directory and copy to it • ‘sudo mkdir xxx’ • ‘sudo cp ~/.* xxx/’ • Hybrid with USB SD card reader
  • 14.
    14 Basic file anddirectory actions • If you are familiar with old MS/DOS much of this will be familiar • Lots of differences though • Broken down into the following areas: • Directory Navigation • Finding Files • Manipulating Files • Space Usage and Availability • Command History (Remember: the best programmers are lazy) • System Commands • More Information • Introduction to Editing (if time allows)
  • 15.
    15 Directory navigation • Youwill find UNIX directory structure very familiar • Windows shares many similarities include tree-metaphor structure • Use / instead of Windows’ • No drive letters • All disks are attached to the main directory structure (“mounted”) • DOS 3.1 – 6 included the ‘join’ command Cygwin is a special case • Directory Navigation • ‘cd’ – change directory • ‘cd’ with no parameters – change to home directory • ‘cd -’ – change to previous directory (where you were before) • ‘pwd’ – display the current directory (Windows ‘cd’ does this)
  • 16.
    16 Directory navigation • Absolute,Relative, and Home-relative Forms • Absolute specifies the entire directory path • cd /home/dhorvath/subdirectory/subsub/etc • Relative specifies the directory path relative to the current directory • assuming current directory is /home/dhorvath • cd subdirectory/subsub/etc • cd ../dhorvath/subdirectory/subsub/etc • cd .. – takes you up one directory level, can be repeated • “.” – current directory (handy when a command needs a directory and you’re already there)
  • 17.
    17 Directory navigation • Absolute,Relative, and Home-relative Forms • You can also specify via the home directory • cd ~/subdirectory/subsub/etc – relative to my home directory • cd ~userid/subdirectory/etc – relative to userid’s home directory • Directory forms can be used with any command (not just ‘cd’). • Remember that case matters • Enclose path in “” if it contains special characters or spaces • Can cheat and use wild cards if you’re lazy
  • 18.
    18 Finding files • ‘ls’is the primary command for looking at files • Many options are available • -a – show all files; by default, files that begin with “.” are “hidden” • -l – long display showing full information • -1 – list in one column • -t – sort by time • -r – reversed (used with -t) • -R – recurse through subdirectories • Watch for “Arg list too long” – your wildcard list got too large • Windows requires individual programs to expand wildcards • UNIX shell expands wildcards “on the command line”
  • 19.
    19 Finding files • ‘find’is much more complex than ls with many more features • Too many to cover here! • Form is ‘find DIRECTORY –name “wildcard*string” ACTION • DIRECTORY is where to search (and all subdirectories) • -name “wildcard*string” – files to search for • ACTION is one of many options including –print, -ls, and –exec • One use is to get around “Arg list too long” error • Often used to find a specific file if you have no idea where it is • Can execute specific commands on each file found
  • 20.
    20 Finding files • ‘grep’– this is the command when you want to search the contents of a file • General form is ‘grep OPTIONS “search string” file_name_wildcarded’ • Common OPTIONS • -v (invert match – show lines that don’t match) • -i (case insensitive search) • -H (show file names) • -n (show line number) • -r (recurse through subdirectories) • “search string” includes regular expressions • Entire books have been written to explain regular expressions! • ^ (beginning of line) • $ (end of line) • . (any single character) • [ABCabc] (single character that matches any of A, B, C, a, b, c)
  • 21.
    21 Manipulating files • Literallyhundreds of commands • ‘cp’ – copy file contents to a new name • ‘mv’ – move file to a new directory or name • ‘cat’ – concatenate file onto another or to your screen • ‘more’, ‘less’, ‘pg’ – display contents of file one screen at a time • ‘head’ – show first 10 lines of a file • ‘tail’ – show last 10 lines of a file • ‘rm’ – remove file • ‘mkdir’ and ‘rmdir’ – create and remove directories
  • 22.
    22 Space Usage andAvailability • In support roles, we constantly are faced with questions about space: • “how much is used?” • “how much is left?” • ‘ls -l’ will tell you how big a specific file is -r-xr-x--- 1 dhorvath Users 324 Feb 25 2009 logging.properties dr-xr-x--- 4 dhorvath Users 16384 Aug 25 23:35 mingw • Size shown for directories is the space for the directory itself, not the files contained within • Because an individual file can have multiple directory entries (called links), you can’t just add up the sizes of the files.
  • 23.
    23 Space Usage andAvailability • ‘du’ will tell you how much space is used by all the files in a directory (and any subdirectories) $ du 0 ./Process/2009-01-02_bill/final 0 ./Process/2009-01-02_bill 40 ./Process/error_processed_files 0 ./Process/misc 1121952 ./Process • And is smart enough to handle linked files • You can specify the directory to determine usage
  • 24.
    24 Space Usage andAvailability • ‘df’ will tell you how much space is used/available in a file system • With no options, will show all file systems • ‘df .’ will show for the file system that holds the current directory $ df . Filesystem 512-blocks Free %Used Iused %Iused Mounted on /dev/fslv01 1101004800 144043800 87% 104805 1% /ingmnt/ifmdata • inode are the number of files the file system can hold • I will often use -m or -g options to get values in Megabytes or Gigabytes
  • 25.
    25 Korn shell andGNU Forms of History • Programmers are lazy and UNIX/Linux helps! • Many tasks are repetitive so using history helps • vi and emacs modes • Enable with ‘set -o vi’ or ‘set -o emacs’ • Modes are mutually exclusive • Allows the use of basic editor navigation and search commands • Demonstrate • “PC DOS” mode under Cygwin • Shows as emacs mode • Really behaves like the old doskey mode
  • 26.
    26 Korn shell andGNU Forms of History • History commands • ‘fc’ – “Fix Command” – list or recall commands • fc –s string • fc –l • ‘history’ – command history, often an alias for ‘fc -l’
  • 27.
    27 Editing • ‘nano’ –easy editor that was originally named “TIP is not PICO” (another easy editor) • ‘vi’ – Visual display editor is available absolutely everywhere, ‘vim’, which stands for ViIMproved is an updated version • ‘emacs’ – stands for Editor MACroS originally for TECO (Text Editor and Corrector for DEC Systems) by Richard M Stallman in 1976. Very extensible • ‘ed’ – text editor designed for print terminals • ‘sed’ – stream editor much like ‘ed’ but designed for automated manipulation. • Note the tip sheets for nano, vi/vim, and emacs
  • 28.
  • 29.
    29 System Commands • ‘sudo’– super user do (run as administrator) • ‘sudo raspi-config’ – not available with allstar install, configures RPi
  • 30.
    30 System Commands • ‘sudoshutdown -h now’ – shut down system immediately • ‘sudo reboot’ – reboot the system • ‘sudo apt-get’ – APT package handling utility • top • ps –ef
  • 31.
    31 More Information • QuickOverview of Important Commands • ‘man’ – always your friend! • ‘command -?’ – quick summary of that command • ‘command --help’ – GNU style quick summary • Other information sources • Obviously google • RPI Magazine -- https://store.rpipress.cc/collections/latest- releases/products/raspberry-pi-official-magazine-152
  • 32.
    32 Remote access toRaspbery PI • Access: • Putty: • MobaXterm • Cygwin WinX Server • Windows ssh, sftp • TeamViewer
  • 33.
    33 Important directories anddevices • / -- root directory • /home – general directory for users • /home/YOURID • ~YOURID or just ~ • /home/MYID • ~MYID • /etc – configuration files • /usr • /usr/bin • /usr/local • /usr/local/bin • /proc – information about processor • /bin • /dev -- devices • /dev/null • /dev/YOURDEVICE
  • 34.
    34 Updating your applications,tools, and operating system • Several different methods • Via the Application (like Stratux) • Probably least common form • Fresh Install – new chip • Via apt-get commands under Linux • ‘sudo apt-get check’ – check on updates • ‘sudo apt-get update’ – retrieve list of available packages • ‘sudo apt-get upgrade’ – perform any necessary upgrades • Can be dangerous • ‘apt’ is a newer version of ‘apt-get’ but may not be in your distro.
  • 35.
  • 36.
    36 Introduction to Linuxwith Focus on RPI The Author can be contacted at: David B. Horvath, CCP 504 Longbotham Drive, Aston PA 19014-2502, USA Phone: 1-610-859-8826 Email: dhorvath@cobs.com Web: http://www.cobs.com/ LI: http://www.linkedin.com/in/dbhorvath
  • 37.
    37 Introduction to Linuxwith Focus on RPI • It is all about choices
  • 38.
    38 References • https://raspberrytips.com/raspberry-pi-history/ • https://www.in2013dollars.com/uk/inflation/2006?amount=350 •https://www.cam.ac.uk/stories/raspberrypi • https://en.wikipedia.org/wiki/Raspberry_Pi • https://xkcd.com/378/ • https://www.cam.ac.uk/stories/raspberrypi • https://www.techspot.com/article/531-eben-upton-interview/ • https://www.geeksforgeeks.org/how-to-upgrade-raspberry-pi-os/ • GPIO PINS https://pinout.xyz/ • SPI/I2C - https://en.wikipedia.org/wiki/Serial_Peripheral_Interface https://en.wikipedia.org/wiki/I%C2%B2C • Linux Cheat sheet https://phoenixnap.com/kb/linux-commands-cheat- sheet
  • 39.
    39 References • https://sourceforge.net/projects/win32diskimager/files/Archive/Win32DiskI mager-0.9.5-install.exe/download • https://raspberrystreet.com/learn/how-to-backup-raspberrypi-sdcard •https://www.putty.org/ • https://mobaxterm.mobatek.net/download-home-edition.htm • https://x.cygwin.com/ • VIM cheat sheet: https://github.com/sk3pp3r/cheat-sheet- pdf/blob/master/pdf/vim-cheat-sheet.pdf • NANO Cheat Sheet https://www.nano- editor.org/dist/latest/cheatsheet.html • GNU emacs Cheat Sheet https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf
  • 40.
    40 Wrap Up forReal Questions and Answers ?! ?! ?! ?! ? ? ? ? ! ! ! !