Find the answer to your Linux question:
Results 1 to 6 of 6
Hi friends, I am beginner to linux, How to get devices information link keyboard, mouse , usb devices, etc.. connected to linux (using C prg)....... pls guide me..... Thanks in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    5

    How to get device information in Linux


    Hi friends,
    I am beginner to linux, How to get devices information link keyboard, mouse , usb devices, etc.. connected to linux (using C prg)....... pls guide me.....

    Thanks in advance.

    Lakshmi

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    To see PCI connected devices, from the command line do:
    Code:
    lspci
    For USB connected devices...
    Code:
    lsusb
    For a list of options for each, add "--help" after the respective commands... without the quotes of course....
    Linux Mint + IceWM Registered: #371367 New Members: click here

  3. #3
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    Other commands to look at are hwinfo and lshw. These may not be installed by default, but you can use your distributions package manager to install them.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Sep 2007
    Posts
    5

    Information about serial port Devices

    lspci & lsusb wil display the list of devices connectd to usb r pci,
    to get information about serial port devices like mouse, keyboard & parallel port devices lik printer, how can i get these information,


    Thanks

  6. #5
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    As daark.child said -- hwinfo. Install and run:
    Code:
    hwinfo --short
    See here for a lot of info on this subject.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  7. #6
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    udevinfo

    Alternatively, you can try udevinfo.

    Especially if you want to extract the ouput and use it for another program. Because udevinfo outputs are all in name and value pairs, so it is easier to parse.

    Both udevinfo and lshw are pretty good

    Google: "How to extract storage device information without using dmesg"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •