Operating System (OS)
An Operating System (OS) is a collection of programs that serve as an interface between the user and the computer hardware. It manages hardware resources and provides services to software applications.
Types of Operating Systems in the Market:
- Windows 10 / 11
- Linux (versions 8, 7, 6, 5)
- Ubuntu
- CentOS
Two Main Interfaces in Every OS:
- GUI (Graphical User Interface): A user-friendly interface with graphical elements like icons, buttons, and windows.
- CLI (Command Line Interface): A text-based interface where users type commands to perform tasks.
Physical Resources in a Computer:
- RAM (Random Access Memory)
- CPU (Central Processing Unit)
- Hard Disk
Binary System:
- Binary Code: The fundamental language of computers consisting of
0
and1
(binary digits).
User:
A user is an individual who accesses and stores data on the system. The user typically has control over the OS and interacts with it to perform various tasks.
Shell:
The shell acts as a command translator. When a user enters a command, it first goes to the shell, which translates the request into machine language (binary code, 01
) before passing it to the OS for execution.
Kernel:
The kernel is the core of the operating system. It contains the OS source code and manages system resources. It is responsible for handling input and output transactions. Since the kernel cannot understand human language, the shell translates user commands into machine language for it to process.
Hardware:
The hardware refers to the physical components of the system, including RAM, CPU, and the hard disk, where data is stored and processed.
Introduction and Features of Linux
- Linux was started around 1991 by Linus Torvalds.
- Linux is a multi-user, multi-tasking operating system.
- Linux is open source, which means the source code is freely available. Popular distributions include Red Hat Linux, AIX, and Ubuntu.
- Linux is case-sensitive, meaning it differentiates between uppercase and lowercase letters.
Example:
- ls
- cd
Popular Linux Distributions in the Market:
- Red Hat Linux
- CentOS
- Ubuntu
- SUSE Linux
- Fedora
- Debian
- Amazon Linux
Mobile Number (Unique): 9989929282
Post-OS Installation Information
After installing the OS, we will get the following details:
- IP Address
- Username
- Password
Minimum Requirements to Log into Server (Linux/Windows):
- IP Address
- Username
- Password
Pre-requisite Software:
- SSH Port (22)
1. SSH Tools: Used for Logging into One Server from Another
- PuTTY: Commonly used for logging into a server (requires IP, username, and password).
- Super PuTTY: An enhanced version of PuTTY with multiple tab support.
- Git Bash: A command-line shell used in Linux and Windows environments.
- Terminal: Default command-line interface on macOS.
2. FTP Tools: Used for Copying Files Between Servers
- WinSCP: If you're using a Windows laptop and want to transfer files from Windows to Linux.
- FileZilla: If you're using a Mac or Linux laptop, this is the go-to FTP client.
Task for Tomorrow:
Download Git Bash:
- Google search for "Git Bash download."
- Click on the first link: Git SCM Downloads
- Download and install Git Bash.
- After installation, right-click on your Desktop and choose one of the following options:
- Git Bash Here
- Git Bash GUI Here
AWS Cloud: Linux Server Setup
How to Create an AWS Server:
- Create an AWS Account:
- Google search:
console.aws.amazon.com
- Sign up with your email:
Ramaprasad@gmail.com
- AWS Account Name:
Ramaprasad
You will receive 750 hours or 12 months of free tier usage.
- After Creating the Instance:
- Navigate to the PEM file location.
- Right-click and select Git Bash.
- Paste the following command:
bash ssh -i "DevOps.pem" ec2-user@ec2-65-0-74-228.ap-south-1.compute.amazonaws.com
- Execute the command:
bash cd /
- To list files and directories:
bash ls
Linux File Structure / Directory Structure
Linux File System Structure:
Linux File Structure & User Management
5. /home
: Default Home Directory for Normal Users
- The /home directory is where the home directories of normal users are located.
- Example:
cd /home
ls
โ Output:ec2-user jeevan
- Normal User Home Directory:
cd /home/jeevan
- Root User Home Directory:
/root
Types of Users in Linux
1. Root User:
- The root user has full administrative access and permissions over the system.
- Each server has only one root user.
- Root home directory:
/root
- The prompt for the root user is:
#
How to Switch to Root from a Normal User:
- Syntax: ```bash sudo su -
Linux User Management
How to Switch to Root from Normal User:
- To switch from a normal user to the root user, use the following command: ```bash sudo su -
Normal User:
- A normal user has limited permissions. You can create up to 214 crore (but the recommended limit is 64,000) users on a single server.
Normal User Home Directory:
- The home directory for a normal user is typically located at: ```bash cd /home/username # Example: cd /home/Ramaprasad
How to Switch to Root User from Normal User:
- To switch from a normal user to the root user, use the following command: ```bash sudo su -