We help IT Professionals succeed at work.

alot of type in linux I

teera asked
every time i log in to linux i need to type

cd /var/www/html/hvhost/kohsmu.com/httpd/html

It to long How can i set some word that equip valent to  
cd /var/www/html/hvhost/kohsmu.com/httpd/html

and after restart that word should use
Watch Question

Top Expert 2008
You have to create an alias

alias home='cd /home/'

then you can execute home and it will take you to /home/

to save it after restart.

you should add them to .bashrc in your home dir


#User specific aliases and functions
alias purge='sudo aptitude purge'
alias apt='sudo apt-get install'
alias edit='sudo gedit'
alias sources.list='/etc/apt/sources.list'
alias grub.lst=/boot/grub/menu.lst
as shakoush2001 mentioned, an alias is the exact answer to your question.

Another thing you should learn about though is tab completion.

When you are typing, as long as you start typing the word (command or file path) you can hit the tab key to have it auto complete. try it out. example:

cd /v[tab]/w[tab]/h[tab] ....

once you get the hang of that you'll be typing around on the linux command line at super speed.

Software Engineer
Distinguished Expert 2019
After this

ln -s /var/www/html/hvhost/kohsmu.com/httpd/html  ~/mywww

command you have a symlink in your home directory to youw web page..
after cd ~/mywww you are in the intended directory.

cd ~ is equivalent to cd $HOME.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.