Skip to main content

Set Environment Path in Linux


- Create /bin folder in /home directory


- Go to /home/user directory


- Open terminal and type the following command

vim .bashrc

Note: You can open .bashrc file in any editor.


- Add the following line in .bashrc file

export PATH=$PATH:~/bin


- Save the changes in .bashrc file


- Go to ~/bin folder and create any file

Ex: touch uiautomatorviewer

Format : touch filename


- Open file and enter the following code

Ex:

#!/bin/bash
echo "Message";
/home/user/tools/uiautomatorviewer


- Save the file and change it to executable format

chmod +x filename


- Restart the terminal


- Now enter the filename in any directory



Enjoy !!!!!!!!



Regards and Thanks,

Gokul Karthik M
Software QA Engineer
Email : gokul.hotspot@gmail.com
Phone : +91 99441 70730




Comments

  1. simple and useful post... please come up with more posts...

    ReplyDelete

Post a Comment

Popular posts from this blog

PHP Session Clean

I was getting the following error when trying to browse the icingaweb2 website in the browser Fatal error: Uncaught ErrorException: Uncaught ErrorException: session_name(): Cannot change session name when session is active in /usr/share/php/Icinga/Web/Session/PhpSession.php:97 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'session_name():...', '/usr/share/php/...', 97, Array) #1 /usr/share/php/Icinga/Web/Session/PhpSession.php(97): session_name('Icingaweb2') #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(152): Icinga\Web\Session\PhpSession->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(540): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(490): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionCont...

Install and Configure Apache in Ubuntu 14.04

Easy way to install and configure "Apache" server in Ubuntu 14.04 1.Install apache:              sudo apt-get install apache2 2. In /etc/apache2/sites-available/000-default.conf :                 ScriptAlias /cgi-bin/ /var/cgi-bin/                <Directory "/var/cgi-bin">                         AllowOverride None                         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch                     ...

Vazhai – Vizhuppuram Visit Experience sharing 3/4/2018 and 4/4/2018

About Vazhai  : Vazhai is an NGO established in 2004 working on mentoring underprivileged kids from Dharmapuri(Bangalore wing of Vazhai) and Vizhupuram(Chennai wing of Vazhai) districts where due to social and political reasons literacy rate is very low. It was formed by Presidency college graduates under the  guidance of experts like  writer Gnani ( https://en.wikipedia.org/wiki/Gnani_Sankaran ). Vazhai does get some financial aid from The Agaram foundation. Vazhai’s main motive is to raise the children to be  a socially responsible person and to groom them so that he/she gets to lead a dignified life in the society . My initital notion about Vazhai was that it is like a typical educational NGO that would focus on academically training the students and to financially support them. But these do NOT feature as a priority in Vazhai’s agenda. Infact they provide very minimal financial aid to the students. Vazhai works like this : ·     ...