alot of type in linux I

every time i log in to linux i need to type

cd /var/www/html/hvhost/

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

and after restart that word should use
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

http:// thevpn.guruCommented:
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.

nociSoftware EngineerCommented:
After this

ln -s /var/www/html/hvhost/  ~/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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.