Score:2

How can I check how many USB ports are available on my computer in Ubuntu?

gb flag

I am using an Xavier NX, and one of the USB ports doesn't seem to be working for the board I am using with the Xavier NX. I want to check if the ports is available as I am not seeing any devices that I connect to the USB port. Is there a way to check if the system sees the port before connecting the device? e.g., can I list available USB ports (rather than listing connected devices)?

I am using Ubuntu 18.04, and the USB port is accessed on the board via a 20-pin ZIF connector.

lk flag
Bob
You're going to have trouble with this, since there's separate concepts of controllers, hubs, and ports. Some ports may be directly on a controller. Some (most?) ports, including those on a motherboard, will be going through a hub. Some hubs will have all their ports physically present. Other hubs will present ports that are not physically connected to a real port. From software, you can't really tell without manually connecting devices and mapping out the virtual <=> physical ports.
Score:2
mx flag

Try using hwinfo

sudo apt-get install hwinfo

If you do not want to install an app, try running cat /proc/mounts

Another thing you can try, which lists active USB devices, is lsusb.

lsdev | less will list all hardware devices. When looking for USB devices, look for either objects labeled as USB or objects labeled as PCI. I really hope this is a helpful answer.

Source: https://www.howtogeek.com/426199/how-to-list-your-computers-devices-from-the-linux-terminal/

Ralff avatar
gb flag
This outputs over 10k lines in the terminal. Do you have an idea what to look for in the output?
Jeff avatar
mx flag
I honestly have no idea. I am going to fix my answer and provide better information...
Jeff avatar
mx flag
I just updated it and added a couple of commands to try.
Jeff avatar
mx flag
Click on the URL if you need more help.
Nmath avatar
ng flag
If you want us to review some output, edit your question and *post the output*. If it's so excessively long that you think it would be a distraction in the body of your question, upload and link to https://pastebin.ubuntu.com/
Score:1
tj flag

can I list available USB ports (rather than listing connected devices)?

Try this: lspci | grep -i usb

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.