Created
September 8, 2018 12:25
-
-
Save jankuc/aa39f78031632c75b8fd7dbb031e3051 to your computer and use it in GitHub Desktop.
Format new harddrive to ext4 filesystem and mount for use in 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
#!/bin/sh | |
# Check which device you want to work with | |
fdisk -l | |
# Format it with ext4 journaling filesystem. It has sufficiently low number of writes, so it is ok to use with SSDs. | |
mkfs.ext4 /dev/sda | |
# Create directory where the new disk will be mounted | |
mkdir /mnt/evo | |
# Mount the new disk to the newly created directory | |
mount /dev/sda /mnt/evo/ | |
# Check the available space on the newly mounted disk | |
df -h /mnt/evo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment