3

enter image description here

I upgraded to the latest version of Kali Linux and all of a sudden I can't open up files. The file manager shows the files exist and I can get in them through the file manager but cannot do so through the CL.

terdon
  • 242,166

2 Answers2

5

First of all / is a directory, so if you use: cd /something it means that change to directory something which is inside / directory.

You are in /opt directory and you are having three directories there:

Teeth Veil Pycharm-community-2018.3.4

Now if you want to enter in any of these directories, you should use command:

cd directory_name

Or

cd /opt/directory_name

Not cd /directory_name because it will change to directory_name in /.

And same for the Downloads and Desktop directories. If you are in the homedirectory then try to use:

cd Desktop

or

cd /root/Desktop

Not cd /Desktop.

Prvt_Yadav
  • 5,882
2

You're looking for:

cd Desktop

or

cd /root/Desktop

Not cd /Desktop as you have it.

Explanation

The issue that you're having is that you are trying to go to an absolute path rather than a relative path. You should research these terms and understand the significance of placing a / at the beginning of your path. Basically, absolute paths start from the root directory (what you were trying to use), and relative paths start from the working directory of your shell.

For more info, try reading here: https://www.geeksforgeeks.org/absolute-relative-pathnames-unix/

ilkkachu
  • 138,973
Crypteya
  • 494