in this post you can see some useful linux commands and examples. Veiw centos (Linux) important data, Ping, Download and switch users commands.

1. ifconfig command examples

View all the interfaces along with status.
$ ifconfig -a


Start or stop a specific interface using up and down command as shown below.
$ ifconfig eth0 up
$ ifconfig eth0 down

2. Centos Important information with uname command

Uname command displays important information about the system such as — Kernel name, Host name, Kernel release number
$ uname -a

3. Switch user in centos with su command

Switch to a different user account using su command. Super user can switch to any other user without entering their password.
$ su - USERNAME

4. Install softwares in centos with yum command

To install apache using yum.
$ yum install httpd


To upgrade apache using yum.
$ yum update httpd


To uninstall/remove apache using yum.
$ yum remove httpd

5. Centos ping command

Ping a remote host by sending only 5 packets.
$ ping -c 5 gmail.com

6. Download file in centos with wget command

The quick and effective method to download software, music, video from internet is using wget command.
$ wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz

7. Install packages in centos with rpm command

To install apache using rpm.
# rpm -ivh httpd-2.2.3-22.0.1.el5.i386.rpm


To upgrade apache using rpm.
# rpm -uvh httpd-2.2.3-22.0.1.el5.i386.rpm


To uninstall/remove apache using rpm.
# rpm -ev httpd

 

Centos Ping - Switch user in centos