Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2016
    Thanked 0 Times in 0 Posts

    How do I find and gain access to the /var/www directory in Ubuntu?

    I am new to programming. This entire time, I have been able to learn coding by using XAMPP on Windows. Now, I am trying to familiarize myself with Ubuntu Linux, and I watched a tutorial on how to install the LAMP package, with the Apache Server, PHP, and mySQL through the terminal.

    How do I gain access to this folder and open these items in a text editor or IDE for modifying or deletion? Also, I would like to visually just click on the folder without having to access the files through the terminal.
    Last edited by Hjb1694; 09-14-2017 at 12:55 AM.

  2. #2
    Regular Coder
    Join Date
    Oct 2015
    Thanked 45 Times in 42 Posts
    Possibly the simplest way is to create a link to a directory in your /home directory, this way you have file permissions to edit the files created as you will be the user*

    If you want to link to a folder called html (in your home directory) from /var/www

    sudo ln -sfn /home/USER/html /var/www
    Check to see if the files are served from /var/www/html though; and change the above bash script accordingly; as this is where the current server directory is located.

    *however: you might have problems editing files created in your php scripts as the user will become your server (probably www-data), which is a good trade off.

  3. #3
    Super Moderator
    Join Date
    May 2005
    Southern tip of Silicon Valley
    Thanked 233 Times in 226 Posts
    You should have a "File Cabinet" icon on your task bar which open a file explorer window so you can navigate to any folder/file just like your standard Windows explorer.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts