bash: fdisk: command not found

You have to add /sbin to your PATH: PATH=”/sbin:$ […]