Linux Bootcamp Series
- OS acts as an interface between User/Application and Hardware
- OS can interact with multiple devices (Device Driver might be necessary). This interaction complexity is abstracted from users/Applications
- OS also gives some System Applications and User Applications.
- Desktop Operating Systems:
- Example: Windows 10, Mac, Ubuntu Desktop, Fedora
- Users interaction on this server has to be simple.
- Generally GUI Based
- Server Operating Systems
- Examples: Windows Server 2016, Ubuntu Server, RedHat Linux, Open SUSE
- User interaction can be little bit complicated.
- Generally Non-UI / Terminal Based.
Linux Operating System
- Linux works on Desktops/Servers/Embedded Systems etc…
- Linux Kernel is the key component
- A Distribution (Parent Distribution/Platform) is built on top of kernel. Popular Distributions are
- Companies like canonical etc take these parent kernels and they build the distributions which are most widely use. Some of Widely Used Distributions are
- Ubuntu Linux Instance on AWS or Azure
- Git For Windows
Connecting to Linux Machine
- Any Linux Machine can be connected using SSH Protocol.
- Install Git For Windows
- SSH Command for LInux Machines with Username and Password
- SSH Command for LInux Machines with Username and KeyFile(PEM)
ssh -i <path-to-pem> username@ipadress
Important Things to Consider
- Helps you interacting with OS/Kernel
- Shell is a command line based
- bash (Bourne Again Shell)
- Commands perform some action.
- Command has a syntax
- Parameters are of two kinds, Positional Parameters and Named Parameters.
- directly entering the value of parameter
ping google.com mkdir test mv /tmp /temp
- Will have associated name with every paramter you enter
ping -c 10 google.com # -c is named paramter which has a value of 10 ansible-playbook --inventory hosts test.yml # --inventory is named parameter which has value of hosts
- Named parameters generally have two forms
- short form:
- eg: ansible-playbook -i hosts test.yml
- long form:
- eg: ansible-playbook –inventory hosts test.yml
- short form:
- Every Linux command has a help which is called as manual.
- To look at manual of any command use
Sample Commands to be executed
1. Display Linux System Information # Display Linux system information uname -a # Display kernel release information uname -r # Show which version of redhat installed cat /etc/redhat-release # Show how long the system has been running + load uptime # Show system host name hostname # Display the IP addresses of the host hostname -I # Show system reboot history last reboot # Show the current date and time date # Show this month's calendar cal # Display who is online w # Who you are logged in as whoami
Create a folder structure use mkdir and touch