Skip to main content
added 7 characters in body
Source Link
terdon
  • 252.2k
  • 69
  • 480
  • 718

You have to add /sbin/sbin to your PATH:

vagrant@stretch:~$ PATH=PATH="/sbin:$PATH$PATH"
vagrant@stretch:~$ command -v fdisk
/sbin/fdisk

And use fdisk with sudo:

vagrant@stretch:~$ sudo fdisk  -l
Disk /dev/sda: 19.8 GiB, 21265121280 bytes, 41533440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa0fd0b1a

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39438335 39436288 18.8G 83 Linux
/dev/sda2       39440382 41531391  2091010 1021M  5 Extended
/dev/sda5       39440384 41531391  2091008 1021M 82 Linux swap / Solaris

You have add /sbin to your PATH:

vagrant@stretch:~$ PATH=/sbin:$PATH
vagrant@stretch:~$ command -v fdisk
/sbin/fdisk

And use fdisk with sudo:

vagrant@stretch:~$ sudo fdisk  -l
Disk /dev/sda: 19.8 GiB, 21265121280 bytes, 41533440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa0fd0b1a

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39438335 39436288 18.8G 83 Linux
/dev/sda2       39440382 41531391  2091010 1021M  5 Extended
/dev/sda5       39440384 41531391  2091008 1021M 82 Linux swap / Solaris

You have to add /sbin to your PATH:

vagrant@stretch:~$ PATH="/sbin:$PATH"
vagrant@stretch:~$ command -v fdisk
/sbin/fdisk

And use fdisk with sudo:

vagrant@stretch:~$ sudo fdisk  -l
Disk /dev/sda: 19.8 GiB, 21265121280 bytes, 41533440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa0fd0b1a

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39438335 39436288 18.8G 83 Linux
/dev/sda2       39440382 41531391  2091010 1021M  5 Extended
/dev/sda5       39440384 41531391  2091008 1021M 82 Linux swap / Solaris
added 3 characters in body
Source Link
Arkadiusz Drabczyk
  • 26.6k
  • 5
  • 56
  • 70

You have add it/sbin to your PATH:

vagrant@stretch:~$ PATH=/sbin:$PATH
vagrant@stretch:~$ command -v fdisk
/sbin/fdisk

And use fdisk with sudo:

vagrant@stretch:~$ sudo fdisk  -l
Disk /dev/sda: 19.8 GiB, 21265121280 bytes, 41533440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa0fd0b1a

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39438335 39436288 18.8G 83 Linux
/dev/sda2       39440382 41531391  2091010 1021M  5 Extended
/dev/sda5       39440384 41531391  2091008 1021M 82 Linux swap / Solaris

You have add it to your PATH:

vagrant@stretch:~$ PATH=/sbin:$PATH
vagrant@stretch:~$ command -v fdisk
/sbin/fdisk

And use fdisk with sudo:

vagrant@stretch:~$ sudo fdisk  -l
Disk /dev/sda: 19.8 GiB, 21265121280 bytes, 41533440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa0fd0b1a

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39438335 39436288 18.8G 83 Linux
/dev/sda2       39440382 41531391  2091010 1021M  5 Extended
/dev/sda5       39440384 41531391  2091008 1021M 82 Linux swap / Solaris

You have add /sbin to your PATH:

vagrant@stretch:~$ PATH=/sbin:$PATH
vagrant@stretch:~$ command -v fdisk
/sbin/fdisk

And use fdisk with sudo:

vagrant@stretch:~$ sudo fdisk  -l
Disk /dev/sda: 19.8 GiB, 21265121280 bytes, 41533440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa0fd0b1a

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39438335 39436288 18.8G 83 Linux
/dev/sda2       39440382 41531391  2091010 1021M  5 Extended
/dev/sda5       39440384 41531391  2091008 1021M 82 Linux swap / Solaris
Source Link
Arkadiusz Drabczyk
  • 26.6k
  • 5
  • 56
  • 70

You have add it to your PATH:

vagrant@stretch:~$ PATH=/sbin:$PATH
vagrant@stretch:~$ command -v fdisk
/sbin/fdisk

And use fdisk with sudo:

vagrant@stretch:~$ sudo fdisk  -l
Disk /dev/sda: 19.8 GiB, 21265121280 bytes, 41533440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa0fd0b1a

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39438335 39436288 18.8G 83 Linux
/dev/sda2       39440382 41531391  2091010 1021M  5 Extended
/dev/sda5       39440384 41531391  2091008 1021M 82 Linux swap / Solaris