1

Installed Apache and the default working directory is /var/www, when I'm in /root I don't want to navigate to /var/www every time I want to get some work done.

Can I create a link in /root called web or something?

I just bought a VPS from Linode, installed Ubuntu 10.04 LTS and learning how to use it.

3 Answers 3

3

A different solution is to create an alias in your shell.

If you are using bash, put the following in /root/.bashrc:

alias cdw="cd /var/www"

Next time you login you can type "cdw" and go to that directory. You can type this from anywhere and be brought to the /var/www directory.

0
2

Go to /root

cd /root

and type this:

ln -s /var/www web

Then you'll have a folder web in /root that points to /var/www

1
ln -s /var/www .

will give you a link called www to /var/www in the current directory.

2
  • I just did cd www and it didn't point me to /var/www. Any way to do this?
    – eveo
    Sep 20, 2012 at 18:55
  • 1
    @eveo: It did. Try readlink -f ..
    – choroba
    Sep 20, 2012 at 18:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .