 music |
 | � | OSdata.com |
uname
summary
����This subchapter looks at uname, a UNIX (and Linux) command.
����uname returns some basic information about your system.
uname
����This subchapter looks at uname, a UNIX (and Linux) command.
����uname is used to report system information.
����On a Linux machine you can find all of this same information in the appropriate files in the /proc filesystem, but uname utility may be easier and faster to use.
basic use
����Type the uname without any options to get the kernel name.
����$ uname
����Darwin
system
����Use the -s option to get the operating system name.
����$ uname -s
����Darwin
release info
����Use the -r option to get the operating system release information.
����$ uname -r
����9.8.0
operating system version
����Use the -v option to get the operating system version.
����$ uname -v
����Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_PPC
machine
����Use the -m option to get the machine hardware name.
����$ uname -m
����Power Macintosh
����When running on an Intel (or compatiable) processor, you may also get an indication as to whether it is a 32-bit or 64-bit system.
����$ uname -m
����x86_64
processor
����Use the -p option to get the machine processor architecture type.
����$ uname -p
����powerpc
network node
����Use the -n option to get the network node host name (node name).
����$ uname -n
����local
����You can also use the hostname command to get the exact same answer.
all
����Use the -a option to get all of the information available from this command.
����$ uname -a
����Darwin admins-power-mac-g5.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_PPC Power Macintosh
nonstandard
����There are a few additional nonstandard options that may be available. Even if available, they may produce unknown as their output. because these are nonstandard options, you should avaoid using them in a script.
����Use the -i option to get hardware platform information.
����$ uname -i
����x86_64
����Use the -o option to get he operating system name.
����$ uname -o
����GNU/Linux
CentOS and Red hat Enterprise
����You ca find the distribution version number for CentOS or red hat Enterprise Linux with the following command:
����$ cat /etc/redhat-release
����CentOS release 5.4 (Final)
other
����On November 8, 2010, Ramesh Natarajan named this the number 37 most frequently used UNIX/Linux command at this web page 50 Most Frequently Used UNIX / Linux Commands (With Examples).
����In June 2009, Ken Milberg named this command as one of the Top 50 universal UNIX commands at this web page Top 50 Universal INIX commands. Note that this web page requires agreeing to be spammed before you can read it.
comments, suggestions, corrections, criticisms
free music player coding example
����Coding example: I am making heavily documented and explained open source code for a method to play music for free � almost any song, no subscription fees, no download costs, no advertisements, all completely legal. This is done by building a front-end to YouTube (which checks the copyright permissions for you).
����View music player in action: www.musicinpublic.com/.
����Create your own copy from the original source code/ (presented for learning programming).
Because I no longer have the computer and software to make PDFs, the book is available as an HTML file, which you can convert into a PDF.
����Names and logos of various OSs are trademarks of their respective owners.