Thursday, December 11, 2014

Various commands to get Hardware and Software information from the system:

 Various commands to get Hardware information from the system:

On Linux based system most of the hardware information can be extracted from /proc
Example display CPU information:

# cat /proc/cpuinfo

# lscpu

Example display Memory information:

# cat /proc/meminfo

# free

# free –m (check man free for more info) 

Various commands to get Software information from the system:

# cat /proc/version
# uname –a
lsb_release –a
# cat /etc/redhat-release
# rpm qa

Wednesday, December 10, 2014

Keyboard Setting on Linux Redhat


I. To change keyboard language:

There is 2 ways to change your keyboard language on Redhat System

1. Persistent change

#vi /etc/sysconfig/keyboard 
KEYTABLE="fr"
MODEL="pc105+inet"
LAYOUT="fr"
KEYBOARDTYPE="pc
you can change it by editing "fr" to "us" or what ever... 

#system-config-keyboard

2. Temporary change

#setxkbmap fr 


Friday, December 5, 2014

Archiving with Tar


Tar files place several files or the contents of a directory or directories in one file


tar -cvf filename.tar files/directories

To list the contents of a tar file, type: 

#tar -tvf test.tar


To extract the contents of a tar file, type:  

#tar -xvf test.tar


The tar command does not compress files automatically. 

You can compress tar files with:

#tar -czvf test.tar


Compressed tar files are conventionally given the extension .tgz and are compressed with gzip.
To expand a compressed tar file type:

#tar -xzvf test.tgz


Wednesday, December 3, 2014

Compressing with Gzip and Zip

Compressed files use less disk space and download faster than large, uncompressed files.

To compress a file,
# gzip filename.ext

The file will be compressed and saved as filename.ext.gz.

To expand a compressed file, type:
#gunzip filename.ext.gz

To compress a file with zip, type the following:
#zip -r filename.zip files

To extract the contents of a zip file, type:
#unzip filename.zip