i m working on ubuntu and just installed lamp.As i m new to linux i m not sure how to create a directory or file under /var/www of lamp server to start working on my website project
working on lamp server in ubuntu
491 views Asked by frank At
2
There are 2 answers
1

Chances are you do not have sufficient privileges as your normal user to add files or create directories. You can either change the ownership of the /var/www directory (and everything within) or you can sudo
each one you want to add.
From the prompt: chown [your_user_name].users -R /var/www
Then you can mkdir [directory name]
to make a directory or touch [filename]
to create a file.
If you do not change the permissions of the /var/www you may need to put sudo
in front of each of the above commands (will be prompted for password)
Under *nix you can create a directory using
mkdir newdirname
and you can create a new and empty file, usingtouch newfilename
. Those are commands you need to execute from a shell/terminal. In order to get to/var/www
, you will need tocd /var/www
.If you are new to Linux I suggest reading any guide on basic like this or this.