[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

alot of type in linux I

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
0
teera
Asked:
teera
3 Solutions
 
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

#.bashrc

#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
0
 
Heem14Commented:
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.

0
 
nociSoftware EngineerCommented:
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.

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now