Skip navigation

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: