Basic UNIX/LINUX Commands

In my previous post you learned about how to Add and Delete user, How to create a file, how to get Memory Information and Partition Information using Unix commands.

Now in this article you will learn about how to get OS information and CPU information.

Unix and Linux Commands

Few Basic UNIX/LINUX Commands

login as: root
root@192.168.0.14's password:
Last login: Fri Sep 14 16:52:04 2012 from gur-hello.com

Usage: uname [OPTION]...
Print certain system information.  With no OPTION, same as -s.

-a, --all                print all information, in the following order,
except omit -p and -i if unknown:
-s, --kernel-name        print the kernel name
-n, --nodename           print the network node hostname
-r, --kernel-release     print the kernel release
-v, --kernel-version     print the kernel version
-m, --machine            print the machine hardware name
-p, --processor          print the processor type or "unknown"
-i, --hardware-platform  print the hardware platform or "unknown"
-o, --operating-system   print the operating system
--help     display this help and exit
--version  output version information and exit

[root@VM-TEST ~]# uname -a
Linux VM-TEST.hello.com 2.6.32-220.el6.i686 #1 SMP Tue Dec 6 16:15:40 GMT 2011 i686 i686 i386 GNU/Linux

Following command show you OS with release:


[root@VM-TEST ~]# cat /etc/issue
CentOS release 6.2 (Final)
Kernel r on an m

Following command show your system’s version whether it is 64 bit or 32 bit:

[root@VM-TEST ~]# uname -m
i686

[root@VM-TEST ~]# more /etc/redhat-release
CentOS release 6.2 (Final)

Following command show you memory size:


[root@VM-TEST ~]# cat /proc/meminfo
MemTotal:        1030888 kB
MemFree:          353236 kB
Buffers:          186060 kB
Cached:           376336 kB
SwapCached:            0 kB
Active:           415704 kB
Inactive:         192580 kB
Active(anon):      46196 kB
Inactive(anon):     1168 kB
Active(file):     369508 kB
Inactive(file):   191412 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:        141256 kB
HighFree:            280 kB
LowTotal:         889632 kB
LowFree:          352956 kB
SwapTotal:       1572856 kB
SwapFree:        1572856 kB
Dirty:                32 kB
Writeback:             0 kB
AnonPages:         45888 kB
Mapped:            31528 kB
Shmem:              1492 kB
Slab:              53132 kB
SReclaimable:      45520 kB
SUnreclaim:         7612 kB
KernelStack:        1592 kB
PageTables:         3424 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2088300 kB
Committed_AS:     289848 kB
VmallocTotal:     122880 kB
VmallocUsed:        4516 kB
VmallocChunk:     112424 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       10232 kB
DirectMap2M:      897024 kB

Following command show you CPU details:

[root@VM-TEST ~]# more /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
stepping        : 2
cpu MHz         : 2394.000
cache size      : 12288 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx rdtscp lm constant_tsc up arc
h_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock
pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm ida arat d
ts
bogomips        : 4788.00
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

[root@VM-TEST ~]#

Tips to Add and Delete user, Get Memory and Partition Information

SiteGround Black Friday Sale Below Banner

Get Free Blogging Tips & Technology updates in your Email !!!

Subscribe via RSS feed

The following two tabs change content below.
Anil Kumar
IT Blogger Tips focus on Blogging Tips, SEO Tips, Social Media, SQL Tips, PL/SQL Tips, Oracle DBA, Linux/Unix, Latest Technology, How Tos and Technical Solutions. You can find us on Facebook | Twitter |
Find on Google+

Siteground SALE
70% OFF SiteGround WordPress Hosting – $2.95/month (Exclusive Offer !!!)