I'm a student and trying to learn commands. Logged into my ded. test server (Centos) as root and tried to cd to the 'home' directory and then to a diectory where my website is. I get 'no such file or directory.' I'm missing a step, however I don't know what.
When I log into the server I'm at root@server [~]# Need to get to the home directory that has the website accounts.
Tried all kinds of variations of the 'cd" command, eg., cd home etc, but get 'no such file or directory.' I'm missing a step (?) to get to the home dir.?
I don't have redhat installed at the moment but I think the default location for web pages (assuming you've got apache) is /usr/local/apache/htdocs so try
cd /usr/local/apache/htdocs
If that doesn't work look in your conf file for where the documentroot is pointing at:
grep DocumentRoot /etc/httpd/conf/httpd.conf
and whatever that comes back with is where you need to cd to.
FWIW:
If you try commands as the root user you will get into trouble. You are far better off piddling around as a non-priv user. Unless you enjoy completely rebuilding your system....
I have a lower priced test server with no live websites, so if I mess up, it's just another learning experience Plan on wiping the O/S and reinstalling along with learning some things about security. Lots of trial and error, but I seem to learn best that way. It's a new world to me and I find it most intriguing.
Your mistake, above was when you tried to "cd home" You need to cd /home, because home was not relative to where you were. Your root user probably was in HIS home, which is /root. You need the preceding slash / before going to a non relative path (a place not in your current directory)
No problem. I would suggest you check out this site. It is a bit out of date, but about 90% of it should still give you what you need in order to be proficient in Linux usage.