Skip navigation

Tag Archives: commands

This little command saved me a ton of time and searching back in Ubuntu 8.04 when I needed to know what wireless card I had.  I found out by running the command:

lspci|grep -i “wireless”

What It Does

The lspci command shows you your computer’s hardware interfaces (SATA controllers, wireless cards, etc.).  The standard output it gives you can be a little hard to read, so I piped it to grep.  The grep command allows you to search through a file or a program’s output for a line with a string in it that you specify.  The -i option tells grep to ignore case.  The string at the end finishes the command by telling grep what to look for in lspci‘s output.  So, the full command runs lspci, sends the output to grep, which searches through the output to find the string “wireless”, regardless of case.

Why It’s Useful

This command is amazingly useful, especially in Arch Linux.  Arch doesn’t give you a GUI by default and you need to install X with the right drivers.  If you replace “wireless” with “VGA”, you’ll know what you need.

Advertisements