SlideShare a Scribd company logo
1 of 9
Experiment No.2
Student Name: JHA AMIT SUMAN UID:20BCA1066
Branch: BCA Section/Group:20BCA3/B
Semester:4th
DateofPerformance:23/02/2022
SubjectName:LINUXADMINISTRATIONLAB SubjectCode:22E-20CAP-256
1. Aim/Overviewofthepractical:
1) Write a command used to display existing partitions and sizes using 2
differentcommands. After than compare the outputs of both. After this create a new
400MBprimary partition and 2 extended partition under that primary partition and check
whetherboth partitionsarecreatedornot.
2) WriteaCommandthatcan(possibly)beusedtoformatapartition.Writeacommandtoadd
aswappartitionof size200MBand showthepurpose ofusingPartprobe.
3) Createafilesystempartitionof60GBandmount thepartition on thedatadirectory.
4) Createaswappartitionof4.5Gbandturnonthenewlycreatedswappartitiontempor
arily.
2. Tasktobedone: AddingDisk,Partitionsand filesystemto aLinux System
3. Conceptused:
Answer 1: Concept Used while displaying existing partitions and sizes are
fdiskcommand or lsblkcommand
Furtherwecancreateprimaryandextendedpartitionsusingfdiskcommandand
/dev/sda/directoryandcreatingpartitionbyputtingappropriatevalues.
Answer2:Wecanformatapartitionusingmkfscommandinlinuxforaddingaswappartition of
any size we use the swapoff command in the terminal and partprobe is aprogram that
informs the operating system kernel of partition table changes, byrequesting
thattheoperatingsystemre-readthe partitiontable.
Answer3:Wewillcreatefile systempartitionusingfdiskandthenusingmountcommand we
will mounttheypartitionon the datadictionary
Answer 4: Creating Swap partition we will use the command swap and by using
swaponcommandwewould theswap filewecanalso viewthecreatedswap partitionusing
/swapfile
4. Steps/Commandsinvolvedtoperformpractical:=
=
>
Stepsof Answer1
1. OpenLinuxTerminal
2. Writefdisk–Itoviewthepartitions
3. Selectthepartitionusingfdisk/dev/sdal
4. DiskPartitionsdisplayedwithdetails
WecanalsoviewDiskpartitionsusingIsblk. Itdisplaysblockdevices,whenusedwiththe–
foptionitprints file systemtypeonpartitionsas well
NowCreatingprimarypartitionand2extendedpartitions
1. VerifythePartitionsavailable ontheserver:fdisk–I
2. Choosewhichdeviceyouwishto use(suchas/dev/sdaor/dev/sdb)
3. Runfdisk/dev/sdX(WhereXisthedeviceyouwouldliketoaddthepartitionto)
4. Typentocreateanewpartition
5. Specify where you would like the partition to end and start. You can set
thenumberofMBofthepartitioninsteadoftheendcylinderforexample:400M
6. Typeptoviewthepartition,and type‘w’tosavethepartition
==>StepsofAnswer2
Thelsblkcommandwithoutadditionaloptionsdoesnotdisplayinformationaboutthedevices
file systems.
FormattingDiskPartitioninLinux
There are three ways to format disk partitions using the mkfs command, depending on
thefilesystemtype:
 ext4
 FAT32
 NTFS
1. Format a disk partition with the ext4 file system using the follow command: sudo mkfs –
text4/dev/sdbl
2. Next,verifythefilesystemchangeusing thecommand:
3. Lsblk–f
Theterminalprintsoutalistofblockdevices.
4. Locatethepreferredpartitionandconfirmthatitusestheext4filesystem.
Partprobeisprogramthatinformstheoperatingsystemkernelofpartitiontablechanges,by
requesting that the operating system re-read the partition table changes,by requestingthat
theoperatingsystemre-readthepartitiontable.
==>Steps formadding aswapspace
 Createafilethat willbeused forswap:
 sudofallocate-l200M/swapfile
 sudoddif=/dev/zeroof=/swapfilebs=1024count=1048576
 Onlytheroot usershould beableto writeandreadtheswap file.
 Sudochmod600/swapfile
 Usethemkswaputilityto setupthefileasLinuxswaparea:
 Sudomkswap/swapfile
 Enabletheswapwiththefollowingcommand:
 Sudoswapon/swapfile
 Toverifythat theswap is activeuseeithertheswapon
==>Steps for Answer3
1. CreateaPartition
Youcancheckdiskspaceusingfdisk–l
2. SetDiskLabelonthepartition
You can use e2label command to set or change disk labels.The e2label command must
berunasrootuser.
3. Createafilesystem
In a Linux you can create file system using mkfs, mkfs.ext2, njfs,ext3,
mkfs.ext4,mje4fs,xfscommands.OnRHELandCentOSsystemyou
mayinstallanadditionalpackagecalled e4fsprogs which canmanageext4 filesystem.
4. MountingaFileSystem
The most commonly used method for mounting the filesystem is either manually
usingmount command or by adding entries in /etc/fstab files, so that file system gets
mountedduringboottime.
5. DisplayMountInformation
You can run df –h or lsblk command to get mounted device information such as
mountpoint.
==>Steps for Answer4
1. We will create a swap file of size 2GB using dd command as follows.Note that
bs=1024mean read and write up to 1024 bytes at a time and count=(1024*2048)MB
size of thefile.
2. Nowsetupthefileforswapspacewiththemkwapcommand.
3. Next,enabletheswap fileand add itto thesystemasaswapfile.
4. Afterwards, enable the swap file to be mounted at boot time.Edit the /etc/fstab file
andadd the followingline init.
5. Tosethowoftentheswapfilecanbeusedbythekernel,openthe/etc/sysctl.conffileandthebelow.
6. Nowverifytheswapfilewas createdusingtheswaponcommand.
5. Result/Output/Writing
Summary:Outputof Answer1
ViewingDiskpartitionusingfdiskcommand
ViewingDiskpartitionusingfsblkCommand
Creatingaprimarypartitionand2extendedpartitionunderthat
CheckingwhetherPartitionscreatedornot
Outputof Answer 2
Formattingadiskusinglsblkcommand
Outputof Answer 3
Outputof Answer 4
Learningoutcomes(WhatIhavelearnt):
1. Formattingdisk
2. SwappingCommand
3. Partitioningofdisk
4. Primary partition of the disk
5. Extended partition of the disk
EvaluationGrid:
Sr.No. Parameters MarksObtained MaximumMarks
1. Worksheet 10
2. Demonstration/Performance/Pre
Lab Quiz
5
3. PostLabQuiz 5
Thank you so much mam !!

More Related Content

Similar to EXP_2(20BCA1066 Internet).docx

Creating a Scheduled Backup and Replicating System Folders Introduct.docx
Creating a Scheduled Backup and Replicating System Folders Introduct.docxCreating a Scheduled Backup and Replicating System Folders Introduct.docx
Creating a Scheduled Backup and Replicating System Folders Introduct.docx
williejgrant41084
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
Acácio Oliveira
 
Avi Apelbaum - RAC
Avi Apelbaum - RAC Avi Apelbaum - RAC
Avi Apelbaum - RAC
gridcontrol
 

Similar to EXP_2(20BCA1066 Internet).docx (20)

RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux CertificationRH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
 
Logical volume manager xfs
Logical volume manager xfsLogical volume manager xfs
Logical volume manager xfs
 
2.1 design hard disk layout v2
2.1 design hard disk layout v22.1 design hard disk layout v2
2.1 design hard disk layout v2
 
swap process in red hat linux 7
swap process in red hat linux 7swap process in red hat linux 7
swap process in red hat linux 7
 
101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2
 
3 - Disk Partitioning in Red Hat
3 - Disk Partitioning in Red Hat3 - Disk Partitioning in Red Hat
3 - Disk Partitioning in Red Hat
 
Docker Security Paradigm
Docker Security ParadigmDocker Security Paradigm
Docker Security Paradigm
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
 
Epm 1 2_2_instl_config
Epm 1 2_2_instl_configEpm 1 2_2_instl_config
Epm 1 2_2_instl_config
 
Creating a Scheduled Backup and Replicating System Folders Introduct.docx
Creating a Scheduled Backup and Replicating System Folders Introduct.docxCreating a Scheduled Backup and Replicating System Folders Introduct.docx
Creating a Scheduled Backup and Replicating System Folders Introduct.docx
 
linux installation.pdf
linux installation.pdflinux installation.pdf
linux installation.pdf
 
Goroutine stack and local variable allocation in Go
Goroutine stack and local variable allocation in GoGoroutine stack and local variable allocation in Go
Goroutine stack and local variable allocation in Go
 
Mirroring the root_disk under solaris SVM
Mirroring the root_disk under solaris SVMMirroring the root_disk under solaris SVM
Mirroring the root_disk under solaris SVM
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroups
 
os
osos
os
 
Cis 2903 project -202110
Cis 2903 project -202110Cis 2903 project -202110
Cis 2903 project -202110
 
Percona XtraDB 集群文档
Percona XtraDB 集群文档Percona XtraDB 集群文档
Percona XtraDB 集群文档
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
 
Avi Apelbaum - RAC
Avi Apelbaum - RAC Avi Apelbaum - RAC
Avi Apelbaum - RAC
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
 

More from ApkaAmitbro

More from ApkaAmitbro (9)

Exp_3_20BCA1311 Linux Labbyharshdeep.docx
Exp_3_20BCA1311 Linux Labbyharshdeep.docxExp_3_20BCA1311 Linux Labbyharshdeep.docx
Exp_3_20BCA1311 Linux Labbyharshdeep.docx
 
Exp_3_20BCA1066 Linux.docx
Exp_3_20BCA1066 Linux.docxExp_3_20BCA1066 Linux.docx
Exp_3_20BCA1066 Linux.docx
 
Worksheet (4) linux.docx
Worksheet (4) linux.docxWorksheet (4) linux.docx
Worksheet (4) linux.docx
 
Template of Worksheet (4).docx
Template of Worksheet (4).docxTemplate of Worksheet (4).docx
Template of Worksheet (4).docx
 
exp_1_20bca1108(kashish_dixit.docx
exp_1_20bca1108(kashish_dixit.docxexp_1_20bca1108(kashish_dixit.docx
exp_1_20bca1108(kashish_dixit.docx
 
exp 1 internet programing.docx
exp 1 internet programing.docxexp 1 internet programing.docx
exp 1 internet programing.docx
 
new_worksheet.docx
new_worksheet.docxnew_worksheet.docx
new_worksheet.docx
 
exp_1_20bca1066 Internet.docx
exp_1_20bca1066 Internet.docxexp_1_20bca1066 Internet.docx
exp_1_20bca1066 Internet.docx
 
exp unit 1 internet programing.docx
exp unit 1 internet programing.docxexp unit 1 internet programing.docx
exp unit 1 internet programing.docx
 

Recently uploaded

SAUDI ARABIYA | +966572737505 |Jeddah Get Cytotec pills for Abortion pills
SAUDI ARABIYA | +966572737505 |Jeddah Get Cytotec pills for Abortion pillsSAUDI ARABIYA | +966572737505 |Jeddah Get Cytotec pills for Abortion pills
SAUDI ARABIYA | +966572737505 |Jeddah Get Cytotec pills for Abortion pills
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一原版(Caltech毕业证书)加州理工学院毕业证成绩单学位证书
一比一原版(Caltech毕业证书)加州理工学院毕业证成绩单学位证书一比一原版(Caltech毕业证书)加州理工学院毕业证成绩单学位证书
一比一原版(Caltech毕业证书)加州理工学院毕业证成绩单学位证书
atedyxc
 
一比一原版(UC Davis毕业证书)加州大学戴维斯分校毕业证成绩单学位证书
一比一原版(UC Davis毕业证书)加州大学戴维斯分校毕业证成绩单学位证书一比一原版(UC Davis毕业证书)加州大学戴维斯分校毕业证成绩单学位证书
一比一原版(UC Davis毕业证书)加州大学戴维斯分校毕业证成绩单学位证书
atedyxc
 
一比一原版(UCSD毕业证书)加利福尼亚大学圣迭戈分校毕业证成绩单学位证书
一比一原版(UCSD毕业证书)加利福尼亚大学圣迭戈分校毕业证成绩单学位证书一比一原版(UCSD毕业证书)加利福尼亚大学圣迭戈分校毕业证成绩单学位证书
一比一原版(UCSD毕业证书)加利福尼亚大学圣迭戈分校毕业证成绩单学位证书
atedyxc
 
Zepto Case study(On Track to Profitability).pptx
Zepto Case study(On Track to Profitability).pptxZepto Case study(On Track to Profitability).pptx
Zepto Case study(On Track to Profitability).pptx
aryan963438
 
State Space Tutorial.pptxjjjjjjjjjjjjjjj
State Space Tutorial.pptxjjjjjjjjjjjjjjjState Space Tutorial.pptxjjjjjjjjjjjjjjj
State Space Tutorial.pptxjjjjjjjjjjjjjjj
joshuaclack73
 
一比一原版(SFU毕业证书)西蒙菲莎大学毕业证成绩单学位证书
一比一原版(SFU毕业证书)西蒙菲莎大学毕业证成绩单学位证书一比一原版(SFU毕业证书)西蒙菲莎大学毕业证成绩单学位证书
一比一原版(SFU毕业证书)西蒙菲莎大学毕业证成绩单学位证书
atedyxc
 
一比一原版(Cornell毕业证书)康奈尔大学毕业证成绩单学位证书
一比一原版(Cornell毕业证书)康奈尔大学毕业证成绩单学位证书一比一原版(Cornell毕业证书)康奈尔大学毕业证成绩单学位证书
一比一原版(Cornell毕业证书)康奈尔大学毕业证成绩单学位证书
atedyxc
 
Rapport annuel de Encevo Group pour l'année 2023
Rapport annuel de Encevo Group pour l'année 2023Rapport annuel de Encevo Group pour l'année 2023
Rapport annuel de Encevo Group pour l'année 2023
Paperjam_redaction
 
一比一原版(UCSB毕业证书)圣塔芭芭拉社区大学毕业证成绩单学位证书
一比一原版(UCSB毕业证书)圣塔芭芭拉社区大学毕业证成绩单学位证书一比一原版(UCSB毕业证书)圣塔芭芭拉社区大学毕业证成绩单学位证书
一比一原版(UCSB毕业证书)圣塔芭芭拉社区大学毕业证成绩单学位证书
atedyxc
 

Recently uploaded (20)

SAUDI ARABIYA | +966572737505 |Jeddah Get Cytotec pills for Abortion pills
SAUDI ARABIYA | +966572737505 |Jeddah Get Cytotec pills for Abortion pillsSAUDI ARABIYA | +966572737505 |Jeddah Get Cytotec pills for Abortion pills
SAUDI ARABIYA | +966572737505 |Jeddah Get Cytotec pills for Abortion pills
 
一比一原版(Caltech毕业证书)加州理工学院毕业证成绩单学位证书
一比一原版(Caltech毕业证书)加州理工学院毕业证成绩单学位证书一比一原版(Caltech毕业证书)加州理工学院毕业证成绩单学位证书
一比一原版(Caltech毕业证书)加州理工学院毕业证成绩单学位证书
 
一比一原版(UC Davis毕业证书)加州大学戴维斯分校毕业证成绩单学位证书
一比一原版(UC Davis毕业证书)加州大学戴维斯分校毕业证成绩单学位证书一比一原版(UC Davis毕业证书)加州大学戴维斯分校毕业证成绩单学位证书
一比一原版(UC Davis毕业证书)加州大学戴维斯分校毕业证成绩单学位证书
 
Diversification in Investment Portfolio.pdf
Diversification in Investment Portfolio.pdfDiversification in Investment Portfolio.pdf
Diversification in Investment Portfolio.pdf
 
一比一原版(UCSD毕业证书)加利福尼亚大学圣迭戈分校毕业证成绩单学位证书
一比一原版(UCSD毕业证书)加利福尼亚大学圣迭戈分校毕业证成绩单学位证书一比一原版(UCSD毕业证书)加利福尼亚大学圣迭戈分校毕业证成绩单学位证书
一比一原版(UCSD毕业证书)加利福尼亚大学圣迭戈分校毕业证成绩单学位证书
 
Zepto Case study(On Track to Profitability).pptx
Zepto Case study(On Track to Profitability).pptxZepto Case study(On Track to Profitability).pptx
Zepto Case study(On Track to Profitability).pptx
 
Economic Risk Factor Update: May 2024 [SlideShare]
Economic Risk Factor Update: May 2024 [SlideShare]Economic Risk Factor Update: May 2024 [SlideShare]
Economic Risk Factor Update: May 2024 [SlideShare]
 
State Space Tutorial.pptxjjjjjjjjjjjjjjj
State Space Tutorial.pptxjjjjjjjjjjjjjjjState Space Tutorial.pptxjjjjjjjjjjjjjjj
State Space Tutorial.pptxjjjjjjjjjjjjjjj
 
The Pfandbrief Roundtable 2024 - Covered Bonds
The Pfandbrief Roundtable 2024 - Covered BondsThe Pfandbrief Roundtable 2024 - Covered Bonds
The Pfandbrief Roundtable 2024 - Covered Bonds
 
ACC311_Corporate Income Taxation in the Philippines
ACC311_Corporate Income Taxation  in the PhilippinesACC311_Corporate Income Taxation  in the Philippines
ACC311_Corporate Income Taxation in the Philippines
 
Understanding China(International Trade-Chinese Model of development-Export l...
Understanding China(International Trade-Chinese Model of development-Export l...Understanding China(International Trade-Chinese Model of development-Export l...
Understanding China(International Trade-Chinese Model of development-Export l...
 
Satoshi DEX Leverages Layer 2 To Transform DeFi Ecosystem.pdf
Satoshi DEX Leverages Layer 2 To Transform DeFi Ecosystem.pdfSatoshi DEX Leverages Layer 2 To Transform DeFi Ecosystem.pdf
Satoshi DEX Leverages Layer 2 To Transform DeFi Ecosystem.pdf
 
20240514-Calibre-Q1-2024-Conference-Call-Presentation.pdf
20240514-Calibre-Q1-2024-Conference-Call-Presentation.pdf20240514-Calibre-Q1-2024-Conference-Call-Presentation.pdf
20240514-Calibre-Q1-2024-Conference-Call-Presentation.pdf
 
Big developments in Lesotho Butha-Buthe.
Big developments in Lesotho Butha-Buthe.Big developments in Lesotho Butha-Buthe.
Big developments in Lesotho Butha-Buthe.
 
Economics - Development 01 _ Handwritten Notes.pdf
Economics - Development 01 _ Handwritten Notes.pdfEconomics - Development 01 _ Handwritten Notes.pdf
Economics - Development 01 _ Handwritten Notes.pdf
 
一比一原版(SFU毕业证书)西蒙菲莎大学毕业证成绩单学位证书
一比一原版(SFU毕业证书)西蒙菲莎大学毕业证成绩单学位证书一比一原版(SFU毕业证书)西蒙菲莎大学毕业证成绩单学位证书
一比一原版(SFU毕业证书)西蒙菲莎大学毕业证成绩单学位证书
 
一比一原版(Cornell毕业证书)康奈尔大学毕业证成绩单学位证书
一比一原版(Cornell毕业证书)康奈尔大学毕业证成绩单学位证书一比一原版(Cornell毕业证书)康奈尔大学毕业证成绩单学位证书
一比一原版(Cornell毕业证书)康奈尔大学毕业证成绩单学位证书
 
Rapport annuel de Encevo Group pour l'année 2023
Rapport annuel de Encevo Group pour l'année 2023Rapport annuel de Encevo Group pour l'année 2023
Rapport annuel de Encevo Group pour l'année 2023
 
一比一原版(UCSB毕业证书)圣塔芭芭拉社区大学毕业证成绩单学位证书
一比一原版(UCSB毕业证书)圣塔芭芭拉社区大学毕业证成绩单学位证书一比一原版(UCSB毕业证书)圣塔芭芭拉社区大学毕业证成绩单学位证书
一比一原版(UCSB毕业证书)圣塔芭芭拉社区大学毕业证成绩单学位证书
 
NO1 Top Vashikaran Specialist in Uk Black Magic Specialist in Uk Black Magic ...
NO1 Top Vashikaran Specialist in Uk Black Magic Specialist in Uk Black Magic ...NO1 Top Vashikaran Specialist in Uk Black Magic Specialist in Uk Black Magic ...
NO1 Top Vashikaran Specialist in Uk Black Magic Specialist in Uk Black Magic ...
 

EXP_2(20BCA1066 Internet).docx

  • 1. Experiment No.2 Student Name: JHA AMIT SUMAN UID:20BCA1066 Branch: BCA Section/Group:20BCA3/B Semester:4th DateofPerformance:23/02/2022 SubjectName:LINUXADMINISTRATIONLAB SubjectCode:22E-20CAP-256 1. Aim/Overviewofthepractical: 1) Write a command used to display existing partitions and sizes using 2 differentcommands. After than compare the outputs of both. After this create a new 400MBprimary partition and 2 extended partition under that primary partition and check whetherboth partitionsarecreatedornot. 2) WriteaCommandthatcan(possibly)beusedtoformatapartition.Writeacommandtoadd aswappartitionof size200MBand showthepurpose ofusingPartprobe. 3) Createafilesystempartitionof60GBandmount thepartition on thedatadirectory. 4) Createaswappartitionof4.5Gbandturnonthenewlycreatedswappartitiontempor arily. 2. Tasktobedone: AddingDisk,Partitionsand filesystemto aLinux System 3. Conceptused: Answer 1: Concept Used while displaying existing partitions and sizes are fdiskcommand or lsblkcommand Furtherwecancreateprimaryandextendedpartitionsusingfdiskcommandand /dev/sda/directoryandcreatingpartitionbyputtingappropriatevalues. Answer2:Wecanformatapartitionusingmkfscommandinlinuxforaddingaswappartition of any size we use the swapoff command in the terminal and partprobe is aprogram that informs the operating system kernel of partition table changes, byrequesting thattheoperatingsystemre-readthe partitiontable. Answer3:Wewillcreatefile systempartitionusingfdiskandthenusingmountcommand we will mounttheypartitionon the datadictionary
  • 2. Answer 4: Creating Swap partition we will use the command swap and by using swaponcommandwewould theswap filewecanalso viewthecreatedswap partitionusing /swapfile 4. Steps/Commandsinvolvedtoperformpractical:= = > Stepsof Answer1 1. OpenLinuxTerminal 2. Writefdisk–Itoviewthepartitions 3. Selectthepartitionusingfdisk/dev/sdal 4. DiskPartitionsdisplayedwithdetails WecanalsoviewDiskpartitionsusingIsblk. Itdisplaysblockdevices,whenusedwiththe– foptionitprints file systemtypeonpartitionsas well NowCreatingprimarypartitionand2extendedpartitions 1. VerifythePartitionsavailable ontheserver:fdisk–I 2. Choosewhichdeviceyouwishto use(suchas/dev/sdaor/dev/sdb) 3. Runfdisk/dev/sdX(WhereXisthedeviceyouwouldliketoaddthepartitionto) 4. Typentocreateanewpartition 5. Specify where you would like the partition to end and start. You can set thenumberofMBofthepartitioninsteadoftheendcylinderforexample:400M 6. Typeptoviewthepartition,and type‘w’tosavethepartition ==>StepsofAnswer2 Thelsblkcommandwithoutadditionaloptionsdoesnotdisplayinformationaboutthedevices file systems. FormattingDiskPartitioninLinux There are three ways to format disk partitions using the mkfs command, depending on thefilesystemtype:  ext4  FAT32  NTFS 1. Format a disk partition with the ext4 file system using the follow command: sudo mkfs – text4/dev/sdbl 2. Next,verifythefilesystemchangeusing thecommand:
  • 3. 3. Lsblk–f Theterminalprintsoutalistofblockdevices. 4. Locatethepreferredpartitionandconfirmthatitusestheext4filesystem. Partprobeisprogramthatinformstheoperatingsystemkernelofpartitiontablechanges,by requesting that the operating system re-read the partition table changes,by requestingthat theoperatingsystemre-readthepartitiontable. ==>Steps formadding aswapspace  Createafilethat willbeused forswap:  sudofallocate-l200M/swapfile  sudoddif=/dev/zeroof=/swapfilebs=1024count=1048576  Onlytheroot usershould beableto writeandreadtheswap file.  Sudochmod600/swapfile  Usethemkswaputilityto setupthefileasLinuxswaparea:  Sudomkswap/swapfile  Enabletheswapwiththefollowingcommand:  Sudoswapon/swapfile  Toverifythat theswap is activeuseeithertheswapon ==>Steps for Answer3 1. CreateaPartition Youcancheckdiskspaceusingfdisk–l 2. SetDiskLabelonthepartition You can use e2label command to set or change disk labels.The e2label command must berunasrootuser. 3. Createafilesystem In a Linux you can create file system using mkfs, mkfs.ext2, njfs,ext3, mkfs.ext4,mje4fs,xfscommands.OnRHELandCentOSsystemyou mayinstallanadditionalpackagecalled e4fsprogs which canmanageext4 filesystem. 4. MountingaFileSystem The most commonly used method for mounting the filesystem is either manually usingmount command or by adding entries in /etc/fstab files, so that file system gets mountedduringboottime. 5. DisplayMountInformation You can run df –h or lsblk command to get mounted device information such as mountpoint.
  • 4. ==>Steps for Answer4 1. We will create a swap file of size 2GB using dd command as follows.Note that bs=1024mean read and write up to 1024 bytes at a time and count=(1024*2048)MB size of thefile. 2. Nowsetupthefileforswapspacewiththemkwapcommand. 3. Next,enabletheswap fileand add itto thesystemasaswapfile. 4. Afterwards, enable the swap file to be mounted at boot time.Edit the /etc/fstab file andadd the followingline init. 5. Tosethowoftentheswapfilecanbeusedbythekernel,openthe/etc/sysctl.conffileandthebelow. 6. Nowverifytheswapfilewas createdusingtheswaponcommand. 5. Result/Output/Writing Summary:Outputof Answer1 ViewingDiskpartitionusingfdiskcommand
  • 9. Learningoutcomes(WhatIhavelearnt): 1. Formattingdisk 2. SwappingCommand 3. Partitioningofdisk 4. Primary partition of the disk 5. Extended partition of the disk EvaluationGrid: Sr.No. Parameters MarksObtained MaximumMarks 1. Worksheet 10 2. Demonstration/Performance/Pre Lab Quiz 5 3. PostLabQuiz 5 Thank you so much mam !!