Difference between revisions of "LinuxCommands"
From IGEP - ISEE Wiki
Manel Caro (talk | contribs) |
Manel Caro (talk | contribs) |
||
Line 7: | Line 7: | ||
= System Information = | = System Information = | ||
− | '''arch''': Show the machine arch. | + | '''arch''': Show the machine arch. |
− | '''uname -m''': Show machine arch. | + | '''uname -m''': Show machine arch. |
<pre style="line-height: 11px; font-size: 11px;">[jdoe@localhost ~]$ arch | <pre style="line-height: 11px; font-size: 11px;">[jdoe@localhost ~]$ arch | ||
Line 18: | Line 18: | ||
x86_64 | x86_64 | ||
</pre> | </pre> | ||
− | '''uname -r''': Show the kernel version. | + | '''uname -r''': Show the kernel version. |
− | '''cat /proc/version''': Show kernel version (extra information). | + | '''cat /proc/version''': Show kernel version (extra information). |
<pre>[jdoe@localhost ~]$ uname -r | <pre>[jdoe@localhost ~]$ uname -r | ||
Line 29: | Line 29: | ||
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 | 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 | ||
</pre> | </pre> | ||
− | '''dmidecode -q''': Show the system hardware information. | + | '''dmidecode -q''': Show the system hardware information.<br> |
+ | <pre>[root@localhost ~]# dmidecode -q | ||
+ | </pre> | ||
+ | '''hdparm -i /dev/hda''': Show harddisk information. | ||
− | |||
− | + | '''hdparm -tT /dev/sda''': Do a read test. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'''cat /proc/cpuinfo''': Show CPU information. | '''cat /proc/cpuinfo''': Show CPU information. | ||
+ | <pre>[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:</pre><div><br></div> | |
− | |||
'''cat /proc/interrupts''': Show IRQ information. | '''cat /proc/interrupts''': Show IRQ information. | ||
Revision as of 11:16, 2 February 2014
Overview
This article describes several linux user space commands that can be useful for doing several tasks
Contents
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>