Linux Basic Commands - Bug Reaper

                  Bug Reaper

Lean about Automation Testing,Selenium WebDriver,RestAssured,Appium,Jenkins,JAVA,API Automation,TestNG,Maven, Rest API, SOAP API,Linux,Maven,Security Testing,Interview Questions

Monday, 23 September 2013

Linux Basic Commands



Unix is a open source multi-tasking operating system which was developed in 1969 by a group of AT&T employees at Bell Labs.

Following are some basic Linux command, which we use every day and are very helpful if you are Linux administrator.
1. uname : This command is very useful in verifying server name. When you type this command in your UNIX machine, it will print name, version and other details about the current machine and server.
  
 
Example: uname -a : This command will print the server or machine name along with server version.
2.date : This is very common UNIX command which is used to see date of the system. If you are working on different time zone, then this command is very helpful.
 
Example: date : Will display the current date of the system.

3.df
 : This is a system information command which is used to show disk usage. This command is always used when system administrator handle Filesystem issue in Linux or Sunos server’s or system’s.
Example: df -h or df -k
4.ls:Display filesize in human readable format (e.g. KB, MB etc.,)

Example:ls -lh


5.Kill:

Use kill command to terminate a process. First get the process id using ps -ef command, then use kill -9 to kill the running Linux process as shown below.

Example: ps -ef | grep vim testing 7243 7222 9 22:43 pts/2 00:00:00 vim


 kill -9 7243


6.locate:Using locate command you can quickly search for the location of a specific file
7.tail:

Print the last 10 lines of a file by default.


tail filename.txt 

Print N number of lines from the file named filename.txt


tail -n N filename.txt 

View the content of the file in real time using tail -f. This is useful to view the log files, that keeps growing. The command can be terminated using CTRL-C.


tail -f log-file




8.yum:

To install apache using yum.


yum install httpd

To upgrade apache using yum.


yum update httpd






9.wget:
The quick and effective method to download software, music, video from internet is using wget commad.

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz










No comments:

Post a Comment