Created
May 5, 2015 20:30
-
-
Save k0ala/5c332ca4c4bcd4356648 to your computer and use it in GitHub Desktop.
format and mount a device on linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su | |
devname=/dev/vdb | |
cfdisk $devname | |
mkfs.ext4 $devname"1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
partname=/dev/vdb1 | |
mountdir=/mnt/vdb1 | |
sudo mkdir -p $mountdir | |
sudo mount $partname $mountdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment