A little bit about my background. I have managed servers but always with the help of whm and cpanel. I have used ssh for basic operations. So this is the first time I am setting everything up on my own. I am running Centos 7.
However for some reason I can’t get the directory listing in the terminal. I tried ls
and dir
. Those are the two commands I am aware of… so clearly I am missing something obvious… Can someone point me in the right direction?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Thanks. I figured it out. I was landing in the root directory, and of course the only files I had there were hidden so nothing would show. On my other server I was used to just do a “cd” to go back to home, but on this one I need to add the “/”. As I said… I am new to this…
I created a directory and a php info file.
How did you create the file ? Do you remember the location where you created the file ?
I can’t get the directory listing in the terminal.
Now that you are logged in to the terminal, the current working directory defaults to the home directory for the user.
If you have created the file at say “/home/username/www”, you can use either of the options below
ls /home/username/www
or Navigate to the directory and issue the ls command
cd /home/username/www ls
Hope it helps
Is there a error message?