Adding Path to Environment in Ubuntu

Adding Path to Environment in Ubuntu

After adding some software or programing language or whatever to ubuntu, mostly using the non-synaptic method, our command line would crave for the new terms ;).
Here is how to add the new path to the environment
Lets use how to add the tomcat app server after we install it using the tar file.

1. Open the terminal : Application->Accessories->Terminal
2. use your favorite text editor to open /etc/environment in my case I would use view as vi /etc/environment
3. add the path on new line as CATALINA_HOME=”path/to/catalina”
4. save and exit!!
In most cases, the current shell would not see the effect and you may want to open another tab for that or you can use the export command

if we are appending to the existing path variable, we can use the export command as
export PATH = ${PATH}:/path/to/new/location – here the ${PATH} would maintain the existing path information and the colon would be the separator for the paths

See how you would solve these known algorithm problems

Check if there are three numbers a, b, c giving a total T from array A

Implement Queue Using two Stacks – JavaScript algorithm

Implementing tokenizer and adding tokens to the linked list

Changing decimal number to its binary equivalent

find longest word in the sentence

Finding missing numbers from billion sequential number list file

Get maximum occurring character

Array reversal in Recurrsion

Flatten nested javascript array

Find longest palindrom from sequence of characters

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*