working on lamp server in ubuntu
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
Under *nix you can create a directory using mkdir newdirname
and you can create a new and empty file, using touch newfilename
. Those are commands you need to execute from a shell/terminal. In order to get to /var/www
, you will need to cd /var/www
.
If you are new to Linux I suggest reading any guide on basic like this or this.
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)
精彩评论