1.When using fdisk for the first time, the following information may occur:
bash: fdisk: command not found
It is because the folder /sbin that fdisk located in is not included in $PATH by default. Edit ~/.bash_profile to fix it
$ sudo vim ~/.bash_profile
Attach this to the line PATH:
:/sbin
Write and quit. To take effect immediately, execute
$ source ~/.bash_profile
2.View partitioning information
$ sudo fdisk -l
Attension, a user must use fdisk with sudo, or no information will be displayed.