is Linux ? 2. Where is Linux Used ? 3. What is Kernel 4. Windows vs Linux 5. And lots of hands on :) Slides will be shared later, but not our way of delivering it :)
an operating system (OS) Technically, Linux -> Kernel (Low-level OS) | GNU/Linux -> Linux kernel + GNU Software collection (Libre software) | Linux Distribution -> Linux kernel + GNU Software collection + Desktop environment and additional software Hence a Linux distribution is a complete OS
Relatively more secure • Transparent • Respects privacy • Contribute ◦ Documentation ◦ Features ◦ Bug Fixes • Available in source code and binary • Closed-source • Paid • Relatively less secure • No transparency • <Privacy not found> • Cannot contribute directly apart from reporting bugs • Available in only binary • Often known as BSOD *_*
• Terminal in Linux whereas Command Prompt/Powershell in Windows Terminal - The Force of Linux • An interface to give commands to the OS, more often referred to as a terminal emulator. It allows us to interact with the shell. • Types - gnome-terminal, konsole, xterm, rxvt, kvt, nxterm, and eterm So, what is a shell? • The shell is a program that takes commands from the keyboard and gives them to the OS to perform. • Types - bash(most common), ksh, tcsh, zsh
communication interface between you and the OS. In UNIX-based systems there are two types of shells : 1. Bourne shell (which we will be exploring). 2. The C shell. Bourne shell also has various subcategories like : • Korn shell (ksh) • Bourne shell (sh) • Bourne-again shell (bash) ---- Most common, available by default on most systems • Z shell (zsh) ---- This one looks beautiful when customized!
& Navigation • File Manipulation • System commands • Network commands • Searching, Piping and Redirection • Hardware Info • Users and Permissions • Install packages and Other utilities
shows the current directory (basically, the folder) you’re in 2. cd -> The most basic command of all time, cd (change directory) means change directory 3. ls -> ls (list) list down all the content inside the directory 4. Flags -> A flag is anything prefixed with a dash (-) or double dash (--) that follows the command name 5. tree -> Visualize a directory in a tree structure 6. clear / reset / Ctrl + L -> Typing clear or reset or input any of the key combinations mentioned will get your terminal clean and wiped up 7. man -> If see a new command you’ve never heard of or happen to forget, use man to find out 8. sudo command -> sudo (superuser do) is used to execute commands with admin privileges
2. mkdir -> mkdir (make directory) is used to create a directory 3. mv -> To move files, the command mv (move) is used 4. rm -> rm (remove) removes files, CAUTION: cannot be undone 5. touch -> To create new (empty) files, use touch 6. cp -> To copy a file from one place to another or to make a copy of the file in same directory 7. echo -> echo prints out whatever you say to it 8. Displaying contents of a file -> cat, head, tail 9. tar/unzip -> Used to work with archives and compressed files
such as OS, Kernel, architecture etc. 2. hostname -> Displays the system host name (system name) 3. whoami -> Displays who you are logged in as (user name) 4. date -> Displays current system date and time 5. cal -> Displays the current month and day 6. uptime -> Displays how long your system has been running with load average
2. ping -> ping commands sends a request to a host to establish a connection 3. host -> Performs IP lookup on the domain name 4. whois -> Retrieves more information about a domain 5. wget -> wget (World Wide Web Get) is a very powerful utility to download files from an online service 6. netstat -> Netstat displays various network related information such as network connections, routing tables, interface statistics etc. 7. netcat -> Often referred to as a Swiss army knife of networking tools, this command can assist you in monitoring, testing, and sending data across network connections Network commands
all lines matching the given regular expression". Extremely powerful tool to search for content in files 2. locate -> locate is used to find all instances of a file 3. find -> find is a more aggressive search tool than locate with more options and features 4. | (Pipe) -> It redirects the output of the LHS command to the input of RHS command Syntax: command1 | command2 | command3 5. Redirections -> Similar to pipe, but instead of passing output to another command, they save the o/p to a file or read contents from a file Types -> 1. > 2. < 3. >> 4. << Searching, Piping and Redirection
boot errors 2. lsblk -> Displays block device related information, ex: hard disk, flash drives etc. 3. lsusb -> Displays a list of attached USB devices 4. inxi -> Prints whole lot of information about the hardware, including vendor details, device driver configuration etc, in a readable format 5. fdisk -> Shows disk partition, sizes, and types 6. du -> Displays disk usage in current directory 7. mount -> Mounts a device at specified location 8. umount -> Unmount a mounted device Hardware
-> Shows the last logins 3. Permissions • Types of permission - read (r), write (w), and execute (x) • Arrangement - - --- --- --- dir/file user group others 4. chmod -> chmod (change mode) is used to change permissions of files and directories 5. chown -> chown (change owner) is used to change ownership of a file or directory Users and Permissions
such as Ubuntu 2. dpkg -> Used to install, remove and provide info about .deb packages Other utilities 1. history -> Shows the complete history of your terminal commands 2. alias -> Set up custom aliases for various commands 3. htop -> System monitor (explicit install) 4. neofetch -> Shows the system info in a beautiful format (explicit install) Install Packages and Other Utilities
mode (out of insert mode) • To exit: Press ‘:’ then ‘q’ (stands for quit vim) • To save: Press ‘:’ then ‘w’ (stands for write file) • To save & exit: Press ‘:’ then ‘wq’ (stands for write then quit) Notice ‘wq’ NOT ‘qw’
Find and navigate to react-client • Find src directory by listing and navigate into it • Show current directory path • Using relative paths, find and navigate to react-server/src
• Make an empty file in child1 and subchild2 • Copy the file in subchild2 to child3 with a different name • Move the file in subchild2 to subchild4 with a different name • Remove the child2 directory
README.md file, find the lines containing the word Taylor • Save the output of above command in a file taylor.txt using piping and redirection • Append this file with a line “Lines found”
• Place just one echo command in it with your favourite text • Give all permissions to the user and group, and only read permission to others • Execute the file
z-shell and make it as default shell. 2. For customizing terminal to fullest, you need zsh framework, for ex. Oh-my-zsh.(you can install this framework using this guide - https://github.com/ohmyzsh/ohmyzsh) 3. After installing framework, you can use plugins to customize terminal, like if you want to change theme, you can use powerlevel10k. And if you face problem while using it, they made it easy to uninstall like an easy breakup
- https://linuxjourney.com/ • Awesome Linux - https://github.com/inputsh/awesome-linux • The Complete Linux Course - https://www.youtube.com/watch?v=wBp0Rb-ZJak • Linux commands cheat sheet - https://linoxide.com/guide/linux-cheat-sheet.png • Good place to learn shell scripting - https://linuxcommand.org/ • Another worthwhile resource - https://github.com/learnbyexample/Linux_command_line • Getting Started with Git and Github - https://anmoldeep1509.medium.com/first-steps-to-git-and-github-fda904959256