Skip to content

Instantly share code, notes, and snippets.

@sathed
Created August 10, 2017 19:28
Show Gist options
  • Save sathed/32c6b9763290f952b773766b1a781e23 to your computer and use it in GitHub Desktop.
Save sathed/32c6b9763290f952b773766b1a781e23 to your computer and use it in GitHub Desktop.
Format new volume on Linux
#!/bin/bash
# Swap 'ext4' for the file system type you'd like
# Find partition name by running $ cat proc/partitions
mkfs.ext4 /dev/[partition_name]
# Mount with:
mount /dev/[partition_name] /path/to/directory/
# Always mount on boot:
/dev/[partition_name] /path/to/directory/ ext4 noatime,nodiratime 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment