LinuxCommands

From IGEP - ISEE Wiki

Revision as of 11:16, 2 February 2014 by Manel Caro (talk | contribs)

Jump to: navigation, search

Overview

This article describes several linux user space commands that can be useful for doing several tasks

System Information

arch: Show the machine arch.

uname -m: Show machine arch.

[jdoe@localhost ~]$ arch

x86_64

[jdoe@localhost ~]$ uname -m

x86_64

uname -r: Show the kernel version.

cat /proc/version: Show kernel version (extra information).

[jdoe@localhost ~]$ uname -r

3.11.10-301.fc20.x86_64

[jdoe@localhost ~]$ cat /proc/version 

Linux version 3.11.10-301.fc20.x86_64 (mockbuild@bkernel01.phx2.fedoraproject.org) (gcc version 4.8.2 20131017 (Red Hat 4.8.2-1) (GCC) ) #1 SMP Thu Dec 5 14:01:17 UTC 2013

dmidecode -q: Show the system hardware information.

[root@localhost ~]# dmidecode -q

hdparm -i /dev/hda: Show harddisk information.


hdparm -tT /dev/sda: Do a read test.


cat /proc/cpuinfo: Show CPU information.

[root@localhost ~]# cat /proc/cpuinfo 

processor<span class="Apple-tab-span" style="white-space:pre"> </span>: 0 vendor_id<span class="Apple-tab-span" style="white-space:pre"> </span>: GenuineIntel cpu family<span class="Apple-tab-span" style="white-space:pre"> </span>: 6 model<span class="Apple-tab-span" style="white-space:pre"> </span>: 58 model name<span class="Apple-tab-span" style="white-space:pre"> </span>: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz stepping<span class="Apple-tab-span" style="white-space:pre"> </span>: 9 microcode<span class="Apple-tab-span" style="white-space:pre"> </span>: 0x15 cpu MHz<span class="Apple-tab-span" style="white-space:pre"> </span>: 2891.250 cache size<span class="Apple-tab-span" style="white-space:pre"> </span>: 4096 KB fpu<span class="Apple-tab-span" style="white-space:pre"> </span>: yes fpu_exception<span class="Apple-tab-span" style="white-space:pre"> </span>: yes cpuid level<span class="Apple-tab-span" style="white-space:pre"> </span>: 13 wp<span class="Apple-tab-span" style="white-space:pre"> </span>: yes flags<span class="Apple-tab-span" style="white-space:pre"> </span>: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt aes xsave avx f16c rdrand hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm fsgsbase smep bogomips<span class="Apple-tab-span" style="white-space:pre"> </span>: 5782.50 clflush size<span class="Apple-tab-span" style="white-space:pre"> </span>: 64 cache_alignment<span class="Apple-tab-span" style="white-space:pre"> </span>: 64 address sizes<span class="Apple-tab-span" style="white-space:pre"> </span> power management:

cat /proc/interrupts: Show IRQ information.

cat /proc/meminfo: Show Memory status.

cat /proc/swaps: Show swap files.

cat /proc/net/dev: Show Network adapters and statistics.

cat /proc/mounts: Show mounted volumes in the system.

lspci -tv: Show PCI devices.

lsusb -tv: Show USB devices.

date: Show the system date.

cal 2014: Show calendar <cal + year>

cal 07 2014: Show month.

date 041217002011.00: set date (set, adjust) date y hour.

clock -w: Save date changes in BIOS.

<tt>[jdoe@localhost ~]$ arch</tt>

<tt>x86_64</tt>

<tt>[jdoe@localhost ~]$ uname -m</tt>

<tt>x86_64 </tt>