Difference between revisions of "LinuxCommands"

From IGEP - ISEE Wiki

Jump to: navigation, search
Line 9: Line 9:
 
#'''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;"><tt>[jdoe@localhost ~]$ arch</tt>
+
<pre style="line-height: 11px; font-size: 11px;">[jdoe@localhost ~]$ arch
  
<tt>x86_64</tt>
+
x86_64
  
<tt>[jdoe@localhost ~]$ uname -m</tt>
+
[jdoe@localhost ~]$ uname -m
  
<tt>x86_64</tt></pre>  
+
x86_64
 +
</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>
+
<pre>[jdoe@localhost ~]$ uname -r
[jdoe@localhost ~]$ uname -r
 
  
 
3.11.10-301.fc20.x86_64
 
3.11.10-301.fc20.x86_64
Line 27: Line 27:
 
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>  
#<pre>'''dmidecode -q''': Show the system hardware information.</pre>
+
#
#<pre>'''hdparm -i /dev/hda''': Show harddisk information.</pre>
+
'''dmidecode -q''': Show the system hardware information.
#<pre>'''hdparm -tT /dev/sda''': Do a read test.</pre>
+
 
#<pre>'''cat /proc/cpuinfo''': Show CPU information.</pre>
+
#
#<pre>'''cat /proc/interrupts''': Show IRQ information.</pre>
+
'''hdparm -i /dev/hda''': Show harddisk information.
#<pre>'''cat /proc/meminfo''': Show Memory status.</pre>
+
 
#<pre>'''cat /proc/swaps''': Show swap files.</pre>
+
#
#<pre>'''cat /proc/net/dev''': Show Network adapters and statistics.</pre>
+
'''hdparm -tT /dev/sda''': Do a read test.
#<pre>'''cat /proc/mounts''': Show mounted volumes in the system.</pre>
+
 
#<pre>'''lspci -tv''': Show PCI devices.</pre>
+
#
#<pre>'''lsusb -tv''': Show USB devices.</pre>
+
'''cat /proc/cpuinfo''': Show CPU information.
#<pre>'''date''': Show the system date.</pre>
+
 
#<pre>'''cal 2014''': Show calendar &lt;cal + year&gt;</pre>
+
#
#<pre>'''cal 07 2014''': Show month.</pre>
+
'''cat /proc/interrupts''': Show IRQ information.
#<pre>'''date 041217002011.00''': set date (set, adjust) date y hour.</pre>
+
 
#<pre>'''clock -w''': Save date changes in BIOS.</pre>
+
#
 +
'''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 &lt;cal + year&gt;
 +
 
 +
#
 +
'''cal 07 2014''': Show month.
 +
 
 +
#
 +
'''date 041217002011.00''': set date (set, adjust) date y hour.
 +
 
 +
#
 +
'''clock -w''': Save date changes in BIOS.
 +
 
 
<blockquote>
 
<blockquote>
 
{| cellspacing="0" cellpadding="5" border="2" style="color: lightgreen; background-color: black;"
 
{| cellspacing="0" cellpadding="5" border="2" style="color: lightgreen; background-color: black;"
 
|-
 
|-
| <pre><tt>[jdoe@localhost ~]$ arch</tt>
+
|  
 +
&lt;tt&gt;[jdoe@localhost ~]$ arch&lt;/tt&gt;
 +
 
 +
&lt;tt&gt;x86_64&lt;/tt&gt;
  
<tt>x86_64</tt>
+
&lt;tt&gt;[jdoe@localhost ~]$ uname -m&lt;/tt&gt;
  
<tt>[jdoe@localhost ~]$ uname -m</tt>
+
&lt;tt&gt;x86_64 &lt;/tt&gt;
  
<tt>x86_64 </tt></pre>
 
 
|}
 
|}
</blockquote><pre>
+
</blockquote>
 
 
</pre>
 

Revision as of 11:09, 2 February 2014

Overview

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

System Information

  1. arch: Show the machine arch.
  2. uname -m: Show machine arch.
[jdoe@localhost ~]$ arch

x86_64

[jdoe@localhost ~]$ uname -m

x86_64
  1. uname -r: Show the kernel version.
  2. 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.

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

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

cat /proc/cpuinfo: Show CPU information.

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>