Question

No directory listing in ssh

  • Posted September 14, 2014

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.

  • I have install Apache, MariaDB and PHP
  • I have tested all of them, and they seem to be working. I created a directory and a php info file.
  • I have accessed sftp via terminal

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?

Subscribe
Share

Is there a error message?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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