Skip to content

Instantly share code, notes, and snippets.

@mamedshahmaliyev
Last active August 20, 2021 12:10
Show Gist options
  • Save mamedshahmaliyev/8d343c32ccacd791b412fe08e5c62d5c to your computer and use it in GitHub Desktop.
Save mamedshahmaliyev/8d343c32ccacd791b412fe08e5c62d5c to your computer and use it in GitHub Desktop.
Create partitions in linux
fdisk -l # /dev/sda hdd 1, /dev/sdb hdd 2, etc
fdisk /dev/sdb. #chooose desired disk
# press m for help, press n to create partition, press w to save changes
partprobe # inform system about changes
mkfs -t ext4 /dev/sdb1 # format partition
mkdir /disk1 # create mount point
mount /dev/sdb1 /disk1 # mount created partition
# make mount permanent
vi /etc/fstab
/dev/sdb1 /disk1 ext4 defaults 0 0
# https://www.osradar.com/how-to-manage-partitions-in-centos-8-rhel-8/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment