LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   fdisk (https://www.linuxquestions.org/questions/linux-newbie-8/fdisk-4175432819/)

zndffo 10-18-2012 12:18 AM

fdisk
 
hello
i am working with Debian squeeze 6.0 network install.
bare bones, Zero GUI.
just trying to learn the back end. No GUI, do not want it !.

anyway, while trying to detect the printer cable that is plugged into the USB port.
fishing on the net shows using fdisk to detect .
weird thing is that there is no fdisk or gnu-fdisk.

does any one know what Debian would use in place of fdisk or if fdisk is 'just outside' of the path for some security reason.

thanks

nugat 10-18-2012 12:27 AM

Quote:

Originally Posted by zndffo (Post 4808759)
hello
i am working with Debian squeeze 6.0 network install.
bare bones, Zero GUI.
just trying to learn the back end. No GUI, do not want it !.

anyway, while trying to detect the printer cable that is plugged into the USB port.
fishing on the net shows using fdisk to detect .
weird thing is that there is no fdisk or gnu-fdisk.

does any one know what Debian would use in place of fdisk or if fdisk is 'just outside' of the path for some security reason.

thanks

if you are a regular user, you may not have /sbin, /usr/sbin, and others in your path, and fdisk may be in one of those. to check what your path is, just do:

Code:

echo $PATH
and the directories will be colon-separated.

You can su/sudo to root and look for it, e.g.:
Code:

sudo which fdisk
There is also parted, sfdisk, cfdisk, and others. but last time I used Debian, it had fdisk.

However, a printer would NOT require fdisk, which is used exclusively for partition hard drives! Double-check whatever you were reading, or post it here it you have questions about it.

ntubski 10-18-2012 02:20 AM

Quote:

Originally Posted by zndffo (Post 4808759)
does any one know what Debian would use in place of fdisk or if fdisk is 'just outside' of the path for some security reason.

You can see with this search, that fdisk is installed to /sbin. That means it will by default only be on $PATH if you are root. I wouldn't call it a security reason but fdisk is a program for editing disk partitions which only root has permission to do, so it's of no use for a normal user; I assume that's why it's not in a normal user's $PATH.

chrism01 10-18-2012 04:46 AM

As per above, fdisk is for disks (sic); try lsusb.

zndffo 10-19-2012 08:55 PM

pieces of the puzzle
 
i did not log the website that suggested using fdisk to show what is plugged into hardware ports.

lsusb
man lsusb
this works as a beginning point to work with.

thank you

frankbell 10-19-2012 09:07 PM

If it's a USB printer, the command lsusb (list usb) should show whether it's detected; if it doesn't show, you can doublecheck with the dmesg command.

There is also a utility called pconf-detect. It's mentioned on this page.


All times are GMT -5. The time now is 02:32 PM.