6

I have installed xampp in ubuntu. But I can't find htdocs folder anywhere to put my php codes and test them.

Ashikur Rahman
  • 175
  • 1
  • 2
  • 7

4 Answers4

11

The htdocs folder can be found in /opt/lampp/.

You can navigate to your root folder from the file manager (nautilus by default), by clicking on Other locations from the sidebar, then Computer. From there you can find the opt folder that contains the lampp folder.

To make access to it easier, I suggest creating a symbolic link to it on your desktop with the following command:

ln -s /opt/lampp/htdocs/ ~/Desktop/htdocs/
2

Your files need to be stored in the following directory:

/root/opt/lampp/htdocs/
Error404
  • 6,920
  • 1
  • 26
  • 50
J2jax
  • 33
  • 1
  • 8
1

open terminal (shortcut is Ctrl + Alt + T ) and type

$/opt/lampp/htdocs

then you can open vs code or other text editors easily with terminal ex -

code .

for vscode

0

How to see htdocs? if you are come from windows os .see gui just type on terminal

sudo nautilus

you will see gui file explorer Just go with root filesystem then path ...

opt /lampp /htdocs

With mouse pointer click like in windows.same xampp look .

one thing must do to access htdocs that is access permission so you can access via localhost in browser

so chmod -R 755 /opt/lampp/htdocs

  • 2
    Welcome to AskUbuntu! I had to read the other answers to understand what you meant. This answer could use some clarity. I recommend that you review and apply the concepts found in https://askubuntu.com/help/how-to-answer Cheers! – Elder Geek Dec 30 '19 at 15:07