How to find hardware information from command line on Linux

linux

linux

Hi

In this post you can see some useful command to find and show hardware information on Linux.

Default commands

ALL devices

dmesg

dmesg will show you the kernel messages which can show you all the devices the kernel has found (hard disks,cdroms,etc)

CPU

# cat /proc/cpuinfo

Memory

# cat /proc/meminfo
$ free

PCI (including usb bridges,agp cards etc)

$ lspci

USB devices (mice,etc)

$ lsusb

Hard drives

# fdisk -l
$ df -h

Additional Command

lshw

lshw is a Linux command which provides details of all the hardware in your PC. The details provided by the lshw command run the gamut of processors, memory, slots, onboard sound, video chipset and more.

Install lshw

Arch:

# pacman -S lshw

Debain, Ubuntu or any of its derivatives:

$ sudo aptitude install lshw

Redhat, fedora, CentOS:

# yum install lshw

Gentoo:

# emerge lshw
Run lshw
# lshw
# lshw -short

To get the output in HTML, you use the -html option as follows:

# lshw -html > hardware-info.html

• See lshw command – List hardware information in Linux

dmidecode

dmidecode command reads the system DMI table to display hardware and BIOS information of the server. Apart from getting current configuration of the system, you can also get information about maximum supported configuration of the system using dmidecode. For example, dmidecode gives both the current RAM on the system and the maximum RAM supported by the system.
dmidecode is installed by default on many linux distribution like debain, ubuntu and fedora.
• See How To Get Hardware Information On Linux Using dmidecode Command

have a good time :)

  • Share/Bookmark

How to posting to Identi.ca from the CLI

terminal - cli
Hi :)

Identi.ca is an open source social networking and micro-blogging service.
I like Ideni.ca. It’s good service.

I use CLI (command line) everyday. I like to dented from it. It’s simple.
Just install cURL:

$ sudo apt-get install curl

And type:

$ curl -u username:password -d status="message" http://identi.ca/api/statuses/update.xml

You will receive a response containing the XML coding for your post which acts as a confirmation that your post was submitted.

Also you can create a shell file for this
Open a new text document and add the following, save it as identica.sh (or anything ending in sh):

#!/bin/bash
curl -u username:password -d status=″$1" http://identi.ca/api/statuses/update.xml

Make sure you change the chmod to 777 using the following command.

$ chmod 777 /path/to/file/

When you located the file (or add a bash prompt) it makes it simplier to identi.ca the rules. For example you can type the following to command to link to the file.

$ ./path/to/idetica.sh "Message"
  • Share/Bookmark

Nested X11 environment session


Hi :)

Instead of using a full-blown new virtual X for developing software you can use Xephyr to embed your KDE 4 session into your working KDE 3 or other X11 environment.

If you want to get a minimal KDE session up and running, just launch Xephyr (available in Kubuntu as xserver-xephyr; Gentoo users compile x11-base/xorg-server with USE=”kdrive”):

Xephyr :1 -extension GLX &

You can now launch KDE:

export DISPLAY=:1
/path/to/kde4/bin/startkde &

For other X11 environment just change /path/to/kde4 like:

/usr/bin/startx &

or

/usr/bin/startkde &

or

/usr/bin/startxfce&

You can use “locate” command to find paths like:

locate startkde

Appendix
Happy Nowruz 1387 (Iranian new year holiday)

Good Luck

  • Share/Bookmark

Webmin, Installing on Ubuntu Gutsy Gibbon (7.10)

Webmin
Hi :)
I wrote post about Webmin in ITPencil. My Persian friend like it. I decide to write post about Webmin and how to installing it on Ubuntu Gutsy Gibbon (7.10).
It’s very good for newbie.

from webmin.com:

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.

Installing Webmin On Ubuntu Gutsy Gibbon (7.10)
Webmin has some dependency package.
Install dependencies:

sudo aptitude install bash perl libnet-ssleay-perl openssl \
libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

After install dependencies, you can download and install Webmin. Last version of Webmin is 1.390.
Download Webmin:

sudo wget http://prdownloads.sourceforge.net/webadmin/webmin_1.390_all.deb

Install Webmin:

sudo dpkg -i webmin*.deb

Log in and use it:
Copy this URL into your web browser: https://localhost:10000
(more…)

  • Share/Bookmark

How to install gOS on Ubuntu Gutsy Gibbon

ubuntu-logo-small.png
Hi

I installed gOS on Ubuntu Gutsy Gibbon.
It’s nice but I prefer Gnome windows desktop environment.

gos_screenshot.jpg

If you want to install gOS , from terminal do the following (ONE LINE AT A TIME HITTING ENTER AFTER EACH STEP):

  • Adding gOS repositories
    echo "deb http://packages.thinkgos.com/gos/ painful main"\
     | sudo tee -a /etc/apt/sources.list
    
    echo "deb-src http://packages.thinkgos.com/gos/ painful main"\
     | sudo tee -a /etc/apt/sources.list
    

  • In the terminal enter the command to import the public key of the repository so that the signatures could be verified as follows :
    wget -q http://www.thinkgos.com/files/gos_repo_key.asc -O-\
     | sudo apt-key add -
    
  • Next update your apt cache database using the command :
    sudo apt-get update
    
  • To install the necessary files which will allow you to run gOS on Ubuntu, run the following apt-get command :
    sudo apt-get install greenos-desktop
    
  • If you do not have enlightenment (e17) window manager (WM), then apt-get will have to download and install that too which could hike your download size by around 35 MB.
    • Once installed, you can select gOS/Enlightenment from sessions option in your login screen.

      Good Luck

      • Share/Bookmark