Skip to content

Instantly share code, notes, and snippets.

@d3ividdy
Last active January 24, 2023 04:28
Show Gist options
  • Save d3ividdy/118c5c9884234585282baf42d716a503 to your computer and use it in GitHub Desktop.
Save d3ividdy/118c5c9884234585282baf42d716a503 to your computer and use it in GitHub Desktop.
Formatar & Particionar no Linux CLI

Comandos para Formatação e Particionamento

  • Listagem de discos
fdisk -l
  • Seleciona o disco, n - nova particao, w - escreve e sai
fdisk <disk>
  • Formatar partição para ext4
mkfs.ext4 <partition>
  • Montar a partição
mount -t ext4 <partition> <mount_path>
  • Registrar a partição no FSTAB
blkid # para pegar o UUID
nano fstab # UUID=<UUID> <mount_path> ext4 defaults 0 0
  • Expand Partition
lsblk -fs <partition>
fdisk <disk> # d, n, p, (no remove certificate) (a, to bot flag)
resize2fs <partition>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment