Skip to main content

Posts

Linux fundamental day 2 train with shubham

 Linux Founder—Linus Torvalds Linus Benedict Torvalds is a Finnish software engineer best known for having initiated the development of the Linux kernel and git revision control system. History of LINUX Linux came from a Unix family, Linux is free and open-source software operating systems, which was developed by Linus Torvalds in September 1991. In 1991, When Linus Torvalds was a student at the University of Helsinki, Finland, USA. He developed the first code of Linux 0.01 and post it on Minix newsgroup 17 Sep 1991, his code become so popular people encourage him to develop new code and he was lead to develop new code and release the first “official” version of Linux, version 0.02 on October 5, 1991. Today many year pass and Linux become one of the most popular operating system. Today 90% fastest Supercomputers out of 500 run on Linux variant including top 10. Linux File System Hierarchy + In Linux everything is represented as a file including a hardware program, the files are store
Recent posts

NGINX Web App Deployment for DevOps

  Step 1: Create AWS instance. Step 2: Install NGINX Step 3: Install docker and create a Container for note-app. Step 4: Set up a reverse proxy. Step 5: Copy the code to the root folder. Step 6: Connect the database nginx specification Step 1: Create AWS instance. Log in to the AWS account and create an ec2 server. Nginx is a web server that will serve you static web files. So we require a server. - Create an EC2 instance and name it 'nginx-project-demo'. Also, don't forget to allow HTTP and HTTPS traffic. ( For sake of practice, let's select an Ubuntu machine with t2.micro instance type) Update your server using the command.   sudo apt-get update Step 2: Install NGINX Now install Nginx using the command below. sudo apt install nginx Check the status of nginx. systemctl status nginx Restart the nginx server with root user permission. sudo systemctl restart nginx To check further nginx is successfully installed on your server is to use the server IP and paste it into the

Bash Scripting

  How to Create Your First Bash Scrip touch hello_world.sh Find the path to your bash shell. where bash is located which bash touch hello.sh ls -al Permission of file #! bin bash #! /bin/bash echo "hello" for execute ./hello.sh Comment # before line of comment it give more information about script ++++++++++++++++++++++++++++++++++++++++++++++ when ever we define a Variable it can store somedata string data any no or any other kind of data 1 System variable 2 Userdefine variable System variable echo $BASH echo $BASH_VERSION echo $HOME echo $HASH_VERSION echo $PWD 2. USERDEFINE VARIABLE name = Mark echo $name echo "this is my $name +++++++++++++++++++++++++ #To take the input from user echo "enter name: " read name echo "entered name $name" ++++++++++++++++++ for multiple name echo "enter name: " read name1 name2 echo "Names: entered $name, $name1, $name2" +++++++++++ to print on same line read -p 'usena

All About Linux

  File System cd / It go to root dir. or main dir. ls -ltr it show pre define folder or dir. shows *Everything in linux is a File* we used audio video in daily life that called file but in linux command is also consider as a file Whereis ls cd /usr/bin ls All file avaible all commands avaible file also present To manage all the data and file linux need a file system Os store and manage data on disk or partitions using a structure called filesystem FileSystem includes files, directories and its related permissions. Fs stores data in hierarchy of directories and files. In Windows  INSIDE THE FOLDER LINUX FILE STRUCTURE Types of file system/ versions 1. ext3 extended 3  2. ext4 3. XFS 4. FAT 5. BTRFS etc.. How to check your linux filesystem? lsblk -f 1. XFS (EXTENTS FILE SYSTEM) XFS is 64bit high performance FS support parallel I/O operations works well with large files <Which file we have to use> its depends on application and user requirments cd/ ----> root dirctory or main dir

Day 04 — Basic Linux Shell Scripting

Explain in your own words and examples, what is Shell Scripting for DevOps. What is #!/bin/bash? can we write #!/bin/sh as well? Write a Shell Script which prints I will complete #90DaysOofDevOps challenge Write a Shell Script to take user input, input from arguments and print the variables. Write an Example of If else in Shell Scripting by comparing 2 numbers Was it difficult? 1. What is Kernel The kernel is a computer program that is the core of a computer’s operating system, with complete control over everything in the system. 2. What is Shell A shell is special user program which provide an interface to user to use operating system services. Shell accept human readable commands from user and convert them into something which kernel can understand. It is a command language interpreter that execute commands read from input devices such as keyboards or from files. The shell gets started when the user logs in or start the terminal. 3. What is Linux Shell Scripting? A shell script is a

Day 3 Task: Basic Linux Commands

Day 3 Task: Basic Linux Commands Task: What is the linux command to To view what's written in a file. To change the access permissions of files. To check which commands you have run till now. To remove a directory/ Folder. To create a fruits.txt file and to view the content. Add content in devops.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava. To Show only top three fruits from the file. To Show only bottom three fruits from the file. To create another file Colors.txt and to view the content. Add content in Colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey. To find the difference between fruits.txt and Colors.txt file Solution:- ls - The ls is the list command in Linux. It will show the full list or content of your directory. ls -a - you can see the whole list of files, including the hidden files. ls -l - The ls command will only display the files. ls -d */ - If you only want to display the sub-directories excluding all

Day 2 Task: Basics Linux command

 Day 2 Task: Basics Linux command Task: What is the linux command to  1. Check your present working directory. 2. List all the files or directories including hidden files. 3. Create a nested directory A/B/C/D/E Ans:- 1. "pwd" is command to check present working directory on linux machine. 2. "ls -la" is command to list all the files or directories including hidden files. in above command, "-l" is use for list the files and directories in long list format with extra information and "a" is use for list all including hidden files and directory in linux machine. 3. To create a nested directory use following command :- "mkdir -p A/B/C/D/E"  "-p" stands for "no error if existing, make parent directories as needed" showing the nested directory in linux machine use "tree" command.. Listing commands - ls -l --> list the files and directories in long list format with extra information - ls -a --> list all inclu