Introduction to Linux

• Linux – 1983 Richard Stallman founded the GNU Project • Stands for :GNU's not Unix • Unix-alike OS with • Open source community – Motivation: In early 90s, PC became popular – In 1991, (a Finnish university student) wrote first Linux implementation based on Minix OS. • Originally named as Freax. – Today, Torvalds continues to direct the development of the kernel, while other subsystems such as the GNU components continue to be developed separately. – Tux the penguin is the mascot of Linux. – Redhat Linux, one of the most famous Linux distributors Linux Distributions • : 4.1x.xxx • • Red hat • Chrome OS – Fedora • Apple Macintosh OS – Red hat enterprise Linux • Android smart phone OS: based on • Kali Linux kernel • Ubuntu • And more…. • Debian Kali Linux

• Kali Linux is a Debian-derived designed for digital forensics and penetration testing. – First released in 2013 • Kali Linux has hundreds of (600+) preinstalled cybersecurity tools. – Most are open-source tools • Kali Linux is maintained and funded by Offensive Security Ltd. – BackTrack is Kali's predecessor – www.kali.org What is so special about Kali?

• Availability of over 600 cybersecurity tools • Free and open-source • Multi-language support • Entirely customizable • Support PC, laptop, and ARM-based equipment like Raspberry Pi Common Linux commands • man – get help • rm - remove a file, – like “man ls” or “ls --help” – like “rm test.sh”, – like “rm –rf sat3400” to remove • cd - change directory, directory – like “cd ..”, “cd /bin”, “cd ~tim” • mkdir - make a new directory, • ls - list files, – like “mkdir sat3400” – like “ls /bin”, “ls -la” • pwd - present working directory • mv - move a file (relocate/rename), – like “mv exe1 exe2” • passwd – change password • cp - copy a file, – like “cp exe1 exe2” Common Linux commands • chmod - change the permissions • cat – display text file on a file, – like “cat exe1.sh” – like “chmod 755 exe2.sh” • clear – clear screen • ps – show the running process • reboot – reboot machine – like “ps -e” • su – switch user • kill – kill a process, – like “kill -9 1012”, “kill 1012” • ctrl-c or ctrl-z or ctrl-x: exit or break program Common Linux commands

• grep – search string in files • sudo – allows commands to be – like grep “initial” /etc/* run as the super user – “superuser do” • who – show current users – like sudo service apache2 start • whoami – show your user • apt – handles installation and accountuse removal of software packages • df – show disk space – like sudo apt install vim • useradd – add new user • vim or vi – text editor for CLI – like “useradd –g sat4541 tim” Linux File Permission

• From the CLI : _rwxrwxrwx 1 owner:group • First three characters: permissions for the owner of the file • Second three characters: permissions for the group of the file • Third three characters: permission for everyone else • rwx – Read (r) = 4 – Write (w) = 2 – Execute (x) = 1 Complete on your Raspberry PI • Create a new user using your name – Linux is case sensitive and user names should be all lower case

• Create a unique password for this user that is only known to you

• Add you new user to the sudo group in order to give your new user super user privileges “usermod –aG sudo username”

• Switch to your new user

• Change the permission on the helloMyName.txt file to so that – The new user is the owner – The owner has read and write permissions – The root group has read and write permissions – Everyone else should get read permissions only

• Move the helloMyName.txt file into the new users home directory

• Note: remember to use man pages to help with your commands