Professional Documents
Culture Documents
Linuxunit 1
Linuxunit 1
Linux System Administrator is a person who has ‘root’ access that is ‘superuser’. It
means he has privilege to access everything which includes all user accounts, all
system configurations, home directories with all files therein, all files in system.
With the help of an example, write the steps to mount a device in Linux.
Ans
1. Open Terminal:
• Open a terminal with root privileges. You can use the sudo command or
log in as the root user.
2. Insert USB Device:
• Insert a USB flash drive into the USB port of your computer.
3. Identify Device Name:
• Use the dmesg command to identify the device name assigned to the USB
flash drive. Assume it is /dev/sdb.
bashCopy code
dmesg | tail
4. Check Partitions:
• Use fdisk to find current partitions on the USB flash drive. Assuming it
has one partition named /dev/sdb1.
bashCopy code
fdisk -l /dev/sdb
5. Mount the USB Device:
• Use the mount command to mount the USB flash drive on the /mnt
directory.
bashCopy code
sudo mount /dev/sdb1 /mnt
6. Navigate to Mounted Directory:
• Change into the mounted directory to access the USB device's contents.
bashCopy code
cd /mnt
7. Verify Contents:
• Use ls to verify that you can see the contents of the USB flash drive.
bashCopy code
ls
8. Navigate Back:
• Use cd without any arguments to return to your home directory.
bashCopy code
cd
9. Unmount the USB Device:
• Use the umount command to try to unmount the USB flash drive.
bashCopy code
sudo umount /dev/sdb1
• Note: If there are any processes still using the device, you might need to
close them before unmounting.
These steps demonstrate how to mount and unmount a USB flash drive in Linux. Always
be cautious when dealing with mounted devices, and ensure that no important data is
being accessed or modified before unmounting.
• Determine the logical volume for which you want to create a snapshot. You can
use the lvdisplay command to list existing logical volumes:
bashCopy code
lvdisplay
2. Create a Snapshot:
• Create a mount point and mount the snapshot to access its contents:
bashCopy code
mkdir /mnt/snapshot_mount_point mount /dev/vgname/snap_name /mnt/snapshot_mount_point
4. Perform Operations:
• Use the mounted snapshot for operations such as backup, data recovery, or testing
without affecting the original data.
6. Regular Maintenance: