Last active
July 1, 2020 14:04
-
-
Save mahmoud-eskandari/7fb684e64553a536ed3f0ba567a38547 to your computer and use it in GitHub Desktop.
Mount a new disk to 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 -i | |
# example sda | |
lsblk >> get list of partitions | |
fdisk /dev/sda | |
>> New Partition | |
n | |
>> Partition number (X-28) | |
Ex: 4 | |
>> First sector ... | |
ex: just Enter | |
>> Last sector, ... | |
+NG(+80G) | |
OR | |
enter sector | |
Default equal remaining size | |
>> | |
w | |
q | |
(find UID in outpu) | |
Format: ext4 | |
mkfs.ext4 /dev/sda4 | |
_> UID | |
blkid /dev/sda4 | |
ex: | |
/dev/sda4 | |
---- Mount | |
vi /etc/fstab | |
/dev/disk/by-uuid/{UID} {FOLDER} ext4 defaults 0 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment