Wednesday 30 October 2019

Useful Ubuntu Commands

               Useful Repeatedly used Ubuntu Commands :

               
                                           

To connect to the linux machine using putty

Configure the public ip and click open as shown in the below image, then you will be prompted username and password credentials to enter. Once that is done you will be redirected to home page.


To do ssh after login:

ssh user@yourIp
ex: root@192.xx.1.xx

To start and stop the Apache-tomcat server:

sudo sh startup.sh
sudo sh shutdown.sh

To Copy files from one location to other:

sudo cp src dest

To do secure copy:

sudo scp src dest

To Copy files from one location to other recursivley:

sudo cp -r src dest

To move files from one location to other

sudo mv -i src dest

To check ubuntu version in terminal:

lsb_release -d;

To get additional details
lsb_release -a;

To check Java version

 java -version;

To get java installed path:
file `which java javac`;

To Work with vi editors

sudo vi fileName.txt 

To Jump to last line of file
SHIFT+G 

To Edit the file
Press I

To save file without changes
 ESC : 
 SHIFT + Q! 

To Save File with Changes
 ESC : 
 SHIFT + WQ 

To Search the content
 ESC:
 ?content , then hit enter 
 n - to search back ward 
 N - to search forward 





No comments:

Post a Comment

Working with Ajax and Spring MVC

Working with Ajax and Spring MVC Simple example for ajax call or form posting using spring mvc as below. Validation using Ajax call...