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

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.

| improve this answer | |
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

| improve this answer | |
1
ln -s /var/www .

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.