How to mount and unmount a drive in linux
How To Mount A Drive In Linux
This simple step by step guide will show you how to mount a new hard drive or partitions onto your Linux server
Initially you wanna check the hard drives on your system
fdisk -l
so now you now whats being seen by the system
Command Line
mount /dev/partitionId /some/mounting/pointfor example
mount /dev/sdb /backupThe mounting point path must already be created with proper permissions. So a more likely flow of commands would be below:
Command Line
mkdir /some/mounting/point
chmod 777 /some/mounting/point
mount /dev/partitionId /some/mounting/pointfor example:
mkdir /backupchmod 777 /backupmount /dev/sdb /backupNow you just need to add the addon hard drive into fstab to be booted on startup as well
nano /etc/fstab
How To Unmount A Drive In Linux
Command Line
umount /dev/partitionId
This command is very easy to type wrong. It is NOT unmount. Take another closer look if thats what you saw at first. It is umount — no n here!
|
|
|
|
|
|
Related posts:
- Common SSH Commands and Linux Shell Commands We’ve put together some of the more frequently used SSH...
- Linux server tip: force reboot/shutdown Forcing reboot A Linux Server is not Windows XP and...
- How to Reset your Linux Root Password Whenever you can’t remember Root password, you can read this...
