BIDA PRACTICAL

Practical 3 Download code:- DOWNLOAD Download txt:- Download Download Practical:- Download pdf .Perform the data classification using classification algorithm using R/Python. rainfall Practical 4 Perform the data clustering using clustering algorithm using R/Python newiris Practical - 5 .Perform the Linear regression on the given data warehouse data using R/Python. x Practical 6 Perform the logistic regression on the given data warehouse data using R/Python input Practical 7 Write a Python program to read data from a CSV file, perform simple data analysis, and generate basic insights. (Use Pandas is a Python library) 1. Male to Female ratio on the Titanic: import pandas as pd df= pd.read_csv('train.csv') print(df.columns) print(df['Sex'].value_counts()) print(df['Sex'].value_counts(normalize=True)) 2. Surviving male to female ratio on the Tit...

Master Linux Practical for B.Sc. IT Semester 5: Download pdf and the Comprehensive Guide

Are you pursuing B.Sc. IT and gearing up for your 5th semester Linux practicals? If so, you're in the right place! We understand how crucial practicals are in the curriculum, and that's why we have prepared a detailed PDF covering all the key commands and procedures you'll need. Whether you're a beginner or looking to brush up on your Linux skills, this PDF offers clear, easy-to-follow instructions that make mastering Linux practicals a breeze.


DOWNLOAD PDF

micro pdf print

LSA PDF OPEN

Why This PDF is a Must-Have for B.Sc. IT Students

Linux is an integral part of the B.Sc. IT syllabus, and doing well in your practical exams requires a solid understanding of command-line operations. But let's be honest—sometimes the official material can be overwhelming or unclear. That’s where this PDF comes in. It’s designed with students in mind, breaking down complex commands into simple, step-by-step instructions. From basic file management to advanced networking commands, this guide covers everything that will likely appear in your practical exams.

What You’ll Learn from the PDF

The Linux PDF provides a structured approach to mastering the practical topics in your syllabus. Here’s a snapshot of what you can expect:

  1. Basic Commands: Learn how to navigate the Linux filesystem using ls, cd, mkdir, and other fundamental commands.
  2. File Operations: Detailed instructions on file manipulation using commands like cp, mv, rm, and touch.
  3. Permissions and Ownership: Understand how to manage file permissions using chmod and chown.
  4. Process Management: Master essential commands like ps, kill, and top to control running processes.
  5. Networking: Learn how to configure networks and troubleshoot connectivity using ping, ifconfig, and netstat.
  6. Shell Scripting: Get introduced to basic scripting with the shell, enabling you to automate tasks and streamline your workflow.

Each topic is explained with real-world examples, ensuring that you not only learn the commands but also understand their practical applications.

Easy-to-Follow Step-by-Step Guide

The hallmark of this PDF is its simplicity. We’ve made sure that even if you're new to Linux, you won’t feel lost. Each command is followed by:

  • A detailed explanation of what it does.
  • Instructions on how to use it effectively.
  • Examples that you can practice on your own system.
  • Common errors you might face and how to resolve them.

This approach ensures that you’ll not only know how to execute the commands but also understand when and why to use them, making your practical preparation more efficient.

Download the PDF Now!

The best part? This Linux PDF is available for free download! Simply visit DOWNLOAD PDF, and you’ll find the link to download it directly. I recommend bookmarking it and referring to it whenever you practice. The content is regularly updated to keep pace with any changes in the syllabus or exam patterns.

Need Help? Get in Touch!

Even with this detailed guide, you may still have questions or run into issues. Don’t worry, I’m here to help. If you have any doubts or need further clarification, feel free to contact me. You can reach out via email or leave a comment on the blog, and I’ll get back to you as soon as possible.

Why This Blog?

At ITSCHOOLSURAJ , I am committed to offering valuable educational resources for students like you. Whether it's Linux practicals, web development, or programming tutorials, I strive to create content that helps you succeed in your academic journey. And yes, I also ensure that the blog stays up to date with useful and rich content—so no worries about low-quality information.

Final Thoughts

Your success in B.Sc. IT Semester 5 Linux practicals starts here. Download the PDF, follow the steps, and practice regularly. With the right preparation, you'll be able to tackle your practical exams with confidence. Remember, if you have any questions or need further assistance, I’m just a message away!

Happy learning, and best of luck with your Linux practicals!




practical No:-2 all comond is here:-




Practical No:3

Let's walk through the commands of Practical No. 3, explaining each step with outputs and correcting the issues.

1. Adding users and setting passwords:

bash
[root@client /]# useradd user2 [root@client /]# passwd user2
  • This command creates a new user user2 and sets their password. The system gives warnings about weak passwords, but still accepts them.

Output:

bash
Changing password for user user2. New password: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype new password: passwd: all authentication tokens updated successfully.

The same commands are repeated for user3:

bash
[root@client /]# useradd user3 [root@client /]# passwd user3

Output:

bash
Changing password for user user3. New password: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype new password: passwd: all authentication tokens updated successfully.

2. Creating groups:

bash
[root@client /]# groupadd sales [root@client /]# groupadd account
  • These commands create two new groups: sales and account.

3. Checking user information:

bash
[root@client /]# id user2

Output:

bash
uid=501(user2) gid=501(user2) groups=501(user2)

The id command shows that user2 belongs to its default group (created during user creation). The same is done for user3:

bash
[root@client /]# id user3

Output:

bash
uid=502(user3) gid=502(user3) groups=502(user3)

4. Adding users to groups:

bash
[root@client /]# usermod -aG sales user2 [root@client /]# usermod -aG sales user3
  • These commands add user2 and user3 to the sales group.

Check their groups again:

bash
[root@client /]# id user3

Output:

bash
uid=502(user3) gid=502(user3) groups=502(user3),503(sales)

For user2:

bash
[root@client /]# id user2

Output:

bash
uid=501(user2) gid=501(user2) groups=501(user2),503(sales)

Next, we add user2 and user3 to the account group:

bash
[root@client /]# usermod -aG account user2 [root@client /]# usermod -aG account user3

Check again:

bash
[root@client /]# id user2

Output:

bash
uid=501(user2) gid=501(user2) groups=501(user2),503(sales),504(account)

For user3:

bash
[root@client /]# id user3

Output:

bash
uid=502(user3) gid=502(user3) groups=502(user3),503(sales),504(account)

5. Creating directories and setting permissions:

bash
[root@client /]# mkdir -p /data7/sales7/ /data7/account7
  • Creates two directories: /data7/sales7 and /data7/account7.

6. Setting ownership and permissions:

There was an issue with user9 because this user does not exist. To fix it, use user3 instead:

bash
[root@client /]# chown user3.sales /data7/sales7 [root@client /]# chown user3.account /data7/account7
  • These commands change ownership of /data7/sales7 to user3 and the sales group, and /data7/account7 to user3 and the account group.
bash
[root@client /]# chmod 770 /data7/sales7 [root@client /]# chmod 770 /data7/account7
  • This gives read, write, and execute permissions to the owner and the group for both directories.

7. Switching users:

There was an issue with user10 because it doesn't exist. Let's switch to user3 instead:

bash
[root@client /]# su - user3 [user3@client ~]$
[user3@client ~]$ touch myfile
myfile
[user3@client ~]$cd /data7
[user3@client ~]$ ls
account7 sata7
[user3@client ~]$ ls -l

  • Successfully switched to user3.

This practical demonstrates creating users, adding them to groups, managing directory access, and permissions. Let me know if you need further clarification!

Practical 10:-

Aim: Write the program for following A. Programs on Shell Scripts 
1. Write a shell script to show various system configurations like: 
a. Currently logged user and his login name. 
b. Your current shell.
 c. Your home directory 
d. Your operating system type. 
e. Your current path.
 f. Your current working directory. 
g. Currently number of users logged in. 
if [ $# -ne 0 ] then
 echo "Please do not use arguments" 
exit 
fi 
echo "Currently logged user and his login name is `who am i`" 

echo "Your current shell is $SHELL"

 echo "Your home directory is $HOME" 

echo "Your operating system type is $OSTYPE" 

echo "Your current path is $PATH" 

echo "Your current working directory is $PWD" 

echo "Current login users is `who |wc -l`" 

2. Write a shell script to find lowest of two numbers. 



#!/bin/bash
echo "Enter two numbers:"
read n1 n2

if [ $n1 -lt $n2 ]
then
    echo "First number is lowest."
else
    echo "Second number is lowest."
fi

3. Write a shell script to find factorial of a number:-



#!/bin/bash
fact=1
echo -e "Enter a number:"
read n 
if [ $n -gt 0 ] ; then
    for ((i=$n;i>=1;i--))
    do
        fact=`expr $fact \* $i`
    done
fi
echo "Factorial of $n is $fact."

4. Write a shell script to check if the number is even or odd.:-
 


#!/bin/bash
echo "Enter a number:"
read n

if [ $(($n % 2)) -eq 0 ]
then
    echo "The number is even."
else
    echo "The number is odd."
fi


5. Write a shell script to check whether number is Armstrong.:


#!/bin/bash
echo "Enter the number:"
read c
x=$c
sum=0
r=0

while [ $x -gt 0 ]
do
    r=`expr $x % 10`
    n=`expr $r \* $r \* $r`
    sum=`expr $sum + $n`
    x=`expr $x / 10`
done

if [ $sum -eq $c ]
then
    echo "Number is Armstrong."
else
    echo "Number is not Armstrong."
fi


B. Shell script to automate or monitor tasks/process Monitoring activity of httpd process Write the program using vi editor. 


#!/bin/bash
COUNTER=0

# While loop to check if 'httpd' is running
while ps aux | grep httpd | grep -v grep >/dev/null
do
    COUNTER=$((COUNTER+1))  # Increment the counter
    sleep 1  # Wait for 1 second before checking again
    echo "COUNTER IS $COUNTER"
done

# If the loop exits, httpd is not running, so we attempt to start it
echo "httpd is not running. Starting the service..."
service httpd start

PRACTICAL 4

Working with console RPM and YUM

Console:-

]$ ls  /etc/security/console.app

]$su

]$ vi /etc/pam.d/reboot

 

B. Gaining Privileges

]$ cd ~

]$ yum update

]$ sudo yum update

]$ su root

]$ vi  /etc/sudoers
]$sudo yum update

 

C. RPM

]$ cd~

]$sudo yum install wget

]$ https://dlcdn.apache.org/directory/apacheds/dist/2.0.0.AM27/apacheds-2.0.0.AM27-x86_64.rpm

 

D. YUM

]# yum install mysql

]# yum remove nmap


PRACTICAL 5

Practical 5 Aim : Working with storage, network and Infrastructure Services

 

Step 1 : Insert the USB Flash drive that you used with your server if the window opens showing you the contents of USB Flash drive close it. Step 2 : Open the root shell and type the command dmesg to get the device name.

 Step 3 : Use the following command to wipe of it's content quickly
dd if = /dev/zero of = /dev/sda

 

Step 4 : Use fdisk -cu /dev/sda to open the fdisk on the device and create new partition on it

Step 5 : Enter m to overview all the commands.

Step 6 : Type n for new partition.

Step 7 : Type p for primary partitions.

Step 8 : Enter partition 1 for 1st sector of partition it will take the default value of 208

Step 9 : For the last sector enter the value +500 and enter

Step 10 : Type p to list the point of current partitions.

Step 11 : Again press N to create new partitions.

Step 12 : Type e for extended partitions.

Step 13 : Enter partition No. 2 for the first sector of partition it will take the default value.

Step 14 : For the last sector enter it will take the value.

Step 15 : Again press n to create new partitions.

Step 16 : Type L for logical partitions.

Step 17 : For the first sector of partitions it will take default value.

Step 18 : For last sector +500MB and enter.

Step 19 : Type p to print the list of current partition.

Step 20 : Type w to write new partition to disk.

Step 21 : Type fdisk -cu /dev/sda to open the fdisk interface.

Step 22 : Type n to create new partitions and choose L for logical partition.

Step 23 : Next press enter to select the default starting sector for this partition.

Step 24 : Type +500MB to make this a 500MB partition.

Step 25 : Type t to change the partition type.

Step 26 : Enter partition number 6 and partition type 8E.

Step 27 : Type w to write new partition to disk and exit.

Step 28 : User fdisk -cul /dev/sdb to see the current partition on the disk.

Step 29 : Use pv create /dev/sdb6 to convert it into LVM physical volume.

Step 30 : Use bg create vgroup /dev/sda6 to create a volume group with the name vgroup and to put the logical volume /dev/sdb in it.

Step 31 : Use lv create -n logvol1 -L -124M /dev/vgroup to create a logical volume in volume group.

Step 32 : Use the mkfs ext4 /dev/vgroup/logvol1 to format the volume with exit file system

Step 33 : Use crypt setup look format /dev/sda1 to format the 1st partition as encrypted once when if you really want to do this type YES in all the uppercase. Enter the password you are going to use.

Step 35 : Now use mkfs.ext4 /dev/maper/cryptvol to put a file system on encrypted device you have just open.

Step 36 : Use vi /etc/crypttab to open the file /dev/crypttab put following line in it crypttab /dev/sdb1

Step 37 : Use vi /etc/fs tab and put the following line in it /dev/mapper/cryptvol/dev/vgroup.logvol


PRACTICAL 6:-

Aim: Configuring Server for File Sharing A. Configuring NFS Server

 

]# ifconfig

]# CD ~

]# mkdir /linux

]# touch /linux/{abc.txt,xyz.txt}

]# mkdir /lsa

]# touch /lsa/{lmn.txt,pqr.txt}

]#ls /linux

]# chmod -R 777 /linux

]# chmod -R 777 /lsa

]# vi /etc/exports

/linux

/lsa(rw.sync)

]# service rpcbind restart

]# services nfs restart

]# services iptables stop

Cent os client

]# ifconfig

 

PRACTICAL NO 7

Aim: Configuring DHCP Server, Web Server and Mail Server

 

A. Configuring DHCP Server

 Perform on CentOS Server

 To change the hostname of server:

1. Login as root user and check the IP address of server.

2. Change the hostname of server:

 

• Open /etc/sysconfig/network Modify HOSTNAME= server.viva.edu save n exit

 • Open /etc/hosts Add line 172.16.20.120 server.viva.edu save n exit

• Now hostname server.viva.edu • Now run hostname

3. Install dhcp using yum install dhcp* command.

4. Edit configuration file /etc/dhcp/dhcpd.conf. Initially when opened its empty.

5. Copy content of /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample to /etc/dhcp/dhcpd.conf. When asked whether to overwrite, type yes and enter.

6. Now edit configuration file /etc/dhcp/dhcpd.conf. option domain-name ―viva.edu; option domain-name servers ―server.viva.edu; authoritative; #subnet (comment the subnet line preceding by #) subnet 172.16.0.0 netmask 255.255.0.0 { range 172.16.20.40 172.16.21.60 #option routers (comment the subnet line preceding by #) }

Press Esc and save and exit the file.

7. Start the dhcpd service.

 8. Stop the firewall service.

9. After completing configuration on server, start the client system and login as root user.

10. Check the IP address on it by using ifconfig command.

11. You will see that the address is one from the range specified on server.

 

B. Configuring Web Server

Step 1: Ping to check the connectivity

Step 2: Change the directory to /etc/httpd.check if conf.d file is present

Step 3: Change directory to /var/www/html and create a file index.html

<HTML>

<HEAD>

<title>My page</title>

</head>

<body>

<h1> This is apache server</h1>

</body>

</html>

Step 4: Start the httpd service

Step 5: Open the browser and type localhost

 

C. Configuring Mail Server

Perform on CentOS Server To

change the hostname of server:

• Open /etc/sysconfig/network ª

 Modify HOSTNAME= server.viva.edu      save n exit

• Open /etc/hosts ª

 Add line 172.16.20.120   server.viva.edu   save n exit  

• Now hostname server.viva.edu

• Now run hostname

1. Login as root user.

2. Verify IP address and hostname of server using ifconfig and hostname command.

3. Install mail server using yum install postfix.

4. Edit the configuration file /etc/postfix/main.cf myhostname = server.viva.edu mydomain = viva.edu myorigin = $mydomain mydestination = $myhostname, localhost.$mydomain, localhost mynetworks = 172.16.0.0/16 Press Esc :wq to save and exit.

5. Start the service.

6. Now root sends mail to user2 using mail command. Enter the subject and data you want to send and press Ctrl+d to end the file.

7. Login as user2 to check the mail.

8. Now user2 sends mail to root using mail command. Enter the subject and data you want to send and press Ctrl+d to end the file.

9. Login as root to check the mail.

Practical 8

Aim: Configuring Monitoring and Automation Tasks

A. Configuring System Monitoring Tools

i. Using nice to Change Process Priority:

 

  In this exercise, you‘ll start four dd processes, which, by default, will go on forever. You‘ll see that all of them are started with the same priority and receive about the same amount of CPU time and capacity. Next you‘ll adjust the niceness of two of these processes from within top, which immediately shows the effect of using nice on these commands.

1. Open a terminal window, and use su - to escalate to a root shell

 

2. Type the command dd if=/dev/zero of=/dev/null &, and repeat this four times.

 

3. Now start top. You‘ll see the four dd commands listed at the top. In the PR column, you can see that the priority of all of these processes is set to 20. The NI column, which shows the actual process niceness, indicates a value of 0 for all of the dd processes, and, in the TIME column, you can see that all of the processes use about the same amount of processor time.

4. Now, from within the top interface, press r. On the PID to renice prompt, type the PID of one of the four dd processes, and press Enter. When asked Renice PID 3309 to value:, type 5, and press Enter.

 

5. With the previous action, you lowered the priority of one of the dd commands. You should immediately start seeing the result in top, because one of the dd processes will receive a significantly lower amount of CPU time.

 

6. Repeat the procedure to adjust the niceness of one of the other dd processes. Now use a niceness value of -15. You will notice that this process now tends to consume all of the available resources on your computer. Thus, you should avoid the extremes when working with nice.

 

7. Use the k command from the top interface to stop all processes where you adjusted the niceness.

 

ii. System monitor tool

iii. free command

To check used and free memory in kb and mb

iv. Lsblk

V Blkid

To check list of available block devices in tree structure and ordinary structure. To display information about available block devices.

 

v. findmnt

To display currently mounted file system

vi. Df

vii. Du

viii.  lspci

To display information about PCI buses and devices attached to them.

 

ix. lsusb

To display information about USB buses and devices attached to them.



PRACTICAL 9

Aim: Firewall and Cryptographic Services

A. Securing Server with iptables

Step 1 : Type iptables -L -V to display current configuration

Step 2: Type the following commands :iptables -p INPUT ACCEPT iptables -P OUTPUT

ACCEPT iptables -P FORWARD ACCEPT, iptables -F.

Step 3: Use iptables -L -V to verify that the policy is set for all three chains in filter tables.

Step 4: Use ping to check the connectivity. Step 5: Set a policy for 3 chains type the following iptables -P INPUT DROP, iptables -P OUTPUT DROP, iptables -P FORWARD DROP.

Step 6: Open loopback interface first the put ssh, ptp on their port numbers

Step 7: Save the current configuration by service iptables save command to add an exceptionie allow one specific ip address to access any service usp iptables. -L, -V –line –number

Step 8: Create the exception before.

 

 

 

 

 

 

B. Setting up Cryptographic Services

 

Perform on CentOS Server

 Login as root user

a. Use yum install -y crypto-utils mod_ssl to install the RPM package that contains the genkey command.

C. Use genkey --days 365 yourserver.example.com command to generate keys.

It will specify the location of keys and certificate, press Next

b. Select the key size you want to use. Select the recommended one

c. The system will generate some random bits that are necessary to produce the key.

d. Once the key has been generated, genkey asks whether you want to create a certifi cate signing request. Select No

e. Enter the passphrase for private key. Give space bar here * appears and enter

Enter a long passphrase.

f. Now enter the appropriate information to identify your server

g. After you enter the appropriate identification, the public and private keys are written to the appropriate directories and are ready for use.

h. Open the certificate using following command.


Comments

Popular posts from this blog

ES practical syit sem 4

Java programming practical

Introduction to computer system

Advanced Web Designing (AWD) Practical Guide for B.Sc. IT 5th Semester

CGA practical

Mastering Advanced Java Practical(AJT): A Step-by-Step Guide

Coding kaise sikhe