Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

Practical File of Open Source Lab

Program: B.Tech (CSE) 4st semester


Course Code: CIS216

CT University, Ludhiana

Submitted In partial fulfilment of the requirement for the award of the Degree
of Bachelors of Computer Science and Engineering

Submitted By: Submitted To:

Student Name: Avulamanda Ashok Dr . Gurbinder Singh brar


Registration Id: 72111988
Table of Contents

Sr.No Content Faculty Remarks


Signature

1 Introduction to Linux OS

2 Installation of REDHAT/ Ubuntu


Enterprise Linux OS
3 Basic Linux commands

4 Linux command for directory


specification
PRACTICAL – 1

Introduction to Linux OS
 Linux is a community of open-source Unix like operating systems that are based on the
Linux Kernel.

 The kernel is a program at the heart of the Linux operating system that takes care of
fundamental stuff, like letting hardware communicate with software.

Why do you need an OS?

Every time you switch on your computer, you see a screen where you can perform different
activities like write, browse the internet or watch a video. What is it that makes the computer
hardware work like that? How does the processor on your computer know that you are asking
it to run a mp3 file?
Well, it is the operating system or the kernel which does this work. So, to work on your
computer, you need an Operating System (OS). In fact, you are using one as you read this on
your computer. Now, you may have used popular OS’s like Windows, Apple OS X, but here
we will learn introduction to Linux operating system, Linux overview and what benefits it
offers over other OS choices.
Who created Linux?
 Linux is an operating system or a kernel which germinated as an idea in the mind of young
and bright Linus Torvalds when he was a computer science student. He used to work on the
UNIX OS (proprietary software) and thought that it needed improvements.
 However, when his suggestions were rejected by the designers of UNIX, he thought of
launching an OS which will be receptive to changes, modifications suggested by its users.

Linux Distribution

Linux distribution is an operating system that is made up of a collection of software based on


Linux kernel or you can say distribution contains the Linux kernel and supporting libraries
and software. And you can get Linux based operating system by downloading one of the
Linux distributions and these distributions are available for different types of devices like
embedded devices, personal computers, etc. Around 600 + Linux Distributions are available
and some of the popular Linux distributions are:

 MX Linux
 Manjaro
 Linux Mint
 elementary
 Ubuntu
 Debian
 Solus
 Fedora
 openSUSE
 Deepin

Linux gets its due attention

The main advantage of Linux was that programmers were able to use the Linux Kernel to
design their own custom operating systems. With time, a new range of user-friendly OS’s
stormed the computer world. Now, Linux is one of the most popular and widely used Kernel,
and it is the backbone of popular operating systems like Debian, Knoppix, Ubuntu, and
Fedora. Nevertheless, the list does not end here as there are thousands of best versions of
Linux OS based on the Linux Kernel available which offer a variety of functions to the users.
Advantages of Linux

 The main advantage of Linux, is it is an open-source operating system. This means the
source code is easily available for everyone and you are allowed to contribute, modify and
distribute the code to anyone without any permissions.
 In terms of security, Linux is more secure than any other operating system. It does not
mean that Linux is 100 percent secure it has some malware for it but is less vulnerable than
any other operating system. So, it does not require any anti-virus software.
 The software updates in Linux are easy and frequent.
 Various Linux distributions are available so that you can use them according to your
requirements or according to your taste.
 Linux is freely available to use on the internet.
 It has large community support.
 It provides high stability. It rarely slows down or freezes and there is no need to reboot it
after a short time.
 It maintains the privacy of the user.

Disadvantages of Linux

 It is not very user-friendly. So, it may be confusing for beginners.


 It has small peripheral hardware drivers as compared to windows.

Why Linux?
 UNIX is called the mother of operating systems which laid out the foundation to Linux.
Unix is designed mainly for mainframes and is in enterprises and universities. While Linux is
fast becoming a household name for computer users, developers, and server environment.
You may have to pay for a Unix kernel while in Linux it is free.
 But the commands used on both the operating systems are usually the same. There is not
much difference between UNIX and Linux. Though they might seem different, at the core,
they are essentially the same. Since Linux is a clone of UNIX. So, learning one is same as
learning another
PRACTICAL – 2

Installation of REDHAT/ Ubuntu Enterprise Linux OS


1. What you’ll need
 A laptop or PC (obviously!) with at least 25GB of storage space.

 A flash drive (8GB as a minimum, 12GB or above recommended)

2. Download an Ubuntu Image

 You can download an Ubuntu image


 Make sure to save it to a memorable location on your PC! The Ubuntu Studio ISO is a live
image, which means you can boot it and use all the default applications without actually
installing it. Just create a bootable USB stick and try it out.
3. Create a Bootable USB stick

 To install Ubuntu Desktop, you need to write your downloaded ISO to a USB stick to
create the installation media. This is not the same as copying the ISO, and requires some
bespoke software.

 For this tutorial, we’ll use balena Etcher, as it runs on Linux, Windows and Mac OS.
Choose the version that corresponds to your current operating system, download and install
the tool.

4. Boot from USB flash drive

 Insert the USB flash drive into the laptop or PC you want to use to install Ubuntu and boot
or restart the device. It should recognise the installation media automatically. If not, try
holding F12 during startup and selecting the USB device from the system-specific boot menu.
 You should now see the welcome screen inviting you to either try or install Ubuntu.  To
proceed, click Install Ubuntu.
 You will be asked to select your keyboard layout. Once you’ve chosen one, click Continue.

Note  You can use VMware, Virtual Box in case you want to use multiple OS in your
current system without affecting your system OS.
5. Installation Setup
 Next, you will be prompted to choose between the Normal installation and Minimal
installation options. The minimal installation is useful for those with smaller hard drives or
who don’t require as many pre-installed applications.
 In Other options, you will be prompted to download updates as well as third-party software
that may improve device support and performance (for example, Nvidia graphics drivers)
during the installation. It is recommended to check both of these boxes.

 If you are not currently connected to the internet, you will be prompted to do so at this
point. Ensure you are able to remain connected throughout the installation.

6. Drive Management
 This screen allows you to configure your installation. If you would like Ubuntu to be the
only operating system on your device, select Erase disk and install Ubuntu.
 If you are happy to continue the installation without enabling encryption, click Install Now
and confirm the changes with Continue. Otherwise keep reading.

7. Choose your Location


Select your location and time zone from the map screen and click Continue. This information will be
detected automatically if you are connected to the internet.
8. Create Your Login Details

On this screen, you will be prompted to enter your name and the name of your computer as it will
appear on the network. Finally, you will create a username and a strong password.

9. Complete the Installation

Once the installation has completed, you will be prompted to restart your machine. Click Restart
Now. When you restart, you will be prompted to remove your USB flash drive from the device. Once
you’ve done this, press ENTER. Enter your password on the login screen You’ve installed Ubuntu
PRACTICLE -3

1.Displaying Present working directory


pwd – this command is used to display the present working directory. The present working
directory is the directory which is my current directory.

2. Calendar Command – cal is used to print the calendar of any year and of any month

This will prints the calendar

cal 2022 --- Prints 2022 full year

cal 12d 2022 --- Prints only December month


3.Full Calender Output and Date

Command --- Cal 2023

Date command – is used to print the current system date and time
Date command options

1.Date +%A prints full name of the day

2.Date +%a prints the first three letters of day

3.Date +%B Prints the full month name

4.Date +%b Prints the three letters month name

5.Date +%d Prints the day

6.Date +%H Prints hour in 24hour format

7.Date +%h Prints the three letters month name

8.Date +%l Prints hour in 12hour format

9.Date +%M Prints minutes

10.Date +%m Prints the month number

11.Date +%P Prints the am/pm

12.Date +%p Prints the AM/PM

13. Date +%S Prints seconds

14.Date +%T Prints time in 24hour format

15.Date +%X Prints time in 12hour format

16.Date +%Y Prints full four digit year

17.Date +%y Prints last two digit of the year

18.Date +%Z Prints the time zone


PRACTICLE-4

Linux command for directory specification


Creating a Directory

Mkdir - command is used to create a directory

Creating a single Directory

Mkdir folder1

Creating Multiple Directories

Mkdir folder2 folder3

Changing Directory

Listing Directory Contents ls


This command is used to list the files and directories in the current or specified directory see
the below screen shot. This command is used to check what files and directories we have
created in any directory.
Displaying Present working directory
pwd – this command is used to display the present working directory. The present working directory
is the directory which is my current directory

Removing files and Directories


rmdir – directory Name

You might also like