Thursday 30 July 2015

Frequently Used Linux Commands for Java Developer


                           Frequently Used Linux Commands for Java Developer


Many of the software developer’s work in Linux environment. Below are the list of some frequently used Linux commands.

1) ls -l :- It displays file or directory ,size,modified date and time ,file or folder name,its owner and its permissions.

2) find :-this command used to find files.
            For ex:-To find file in current directory:- find . –name hello.txt
                        To find file under home directory:- find /home –name hello.txt

3) kill:- To close running process,you can use kill -9 process_id or kill -15 process_id.
            Process_id you can find using ps aux | grep process_name

4) top:- this command will show information like tasks,memory,cpu etc.press q to exit or ctrl+c

5) free:-It display used memory and available memory of the system.

6) kill java process:
    ps ax | grep "java" | egrep -v "eclipse" | cut -b1-06 | xargs -t kill

7) free system memory:-
     echo 3 > /proc/sys/vm/drop_caches

8) pwd or cd - :- it shows current directory path.

9)To start,stop ,restart my sql service
    start mysql service:-/etc/init.d/mysqld start
    stop mysql service :- /etc/init.d/mysqld stop
    restart mysql service :- /etc/init.d/mysqld restart

10)To start,stop,restart network
     start network service: /etc/init.d/network start
     stop network service: /etc/init.d/network stop
     restart network service: /etc/init.d/network restart

11) set virtual ip address
     /sbin/ifconfig eth1:0  <vip> netmask 255.255.255.0

12) ifconfig:-displays your machines ip addess and all the interfaces details.

13)  shortcut key :ctrl+alt+f1 –displays the terminal which you can use if your GUI gets hanged up.

14) dhclient:-dhclient reads the file dhclient.conf for configuration instructions. It then gets a list of all the network interfaces that are configured in the current system. For each interface, it attempts to configure the interface using the DHCP protocol. 

For detailed information about this commands,browse google J

 



No comments:

Post a Comment