Sign in with Facebook
FeedGoogleFacebookTwitterLinkedinTechnorati
Home Tech How To Unix & Linux How to use the [uname] command effectively in Unix
How to use the [uname] command effectively in Unix
How to - Linux
Posted by Anand Kahaly in Linux on January 24, 2010  |  0 Comments

This article may seem to be quite meaningless in the beginning but you might find it very useful later on. Specially if your daily job involves a lot of shell scripting and someday you want to fetch a specific part from the output of "uname -a" command. The outputs shown here are from Solaris 10 system but don't worry, the command works the same across all Unix platforms.

cheap cialis no prescriptioncanadian drugstore best price 50mg sildenafil generic cialis no prescription
argaiv1184

To begin with type the "uname -a" at the shell. The output will give you the system info in one single line. It includes OS name, system name, system architecture etc.

bash-3.00# uname -a
SunOS casablanca 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V240

Now suppose you want to pick up a specific info from the above line. You can do this by using different to the uname command. I will start from the beginning of the line. First comes the OS name.

bash-3.00# uname -s
SunOS

Next in line is the hostname.

bash-3.00# uname -n
casablanca

Now the OS version.

bash-3.00# uname -r
5.10

Next comes Generic_127127-11.

bash-3.00# uname -v
Generic_127127-11

Now comes sun4u.

bash-3.00# uname -m
sun4u

Next in line is the OS architecture. In this case its Solaris sparc.

bash-3.00# uname -p
sparc

The last but not the least is SUNW,Sun-Fire-V240

bash-3.00# uname -i
SUNW,Sun-Fire-V240



rssfeed If you found this article helpful, please consider subscribing to Technodope Newsletter.

Enter your email address:

Delivered by FeedBurner

Email Drucken Favoriten Twitter Facebook Myspace Stumbleupon Digg MR. Wong Technorati aol blogger google reddit YahooWebSzenario
 

Subscribe to Technodope Newsletter

Enter your email address:

Delivered by FeedBurner

Post a Job Here for only $10 !!!

 

Sponsored Links

Chronological Archive

Powered by mod LCA