0

When I tried to see the contents in a directory in cae computer it is showing this problem

ryeasmin42@ch208t:~$ ls -alt
could not open file '/etc/apt/sources.list'
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found

Can anyone help me with this?

steeldriver
  • 136,215
  • 21
  • 243
  • 336

1 Answers1

2

could not open file '/etc/apt/sources.list'

This very first error message shows that the search for a ls command is first attempted using the packaging system. sources.list is missing.

Command 'ls' is available in '/bin/ls'

The command could not be located because '/bin' is not included in the PATH environment variable.

ls: command not found

PATH environment variable is a list of directories used by the shell to look for commands. Directories in this list are separated with :

The ls command is not found because your PATH environment variable is not defined or does not contain /bin.

try this:

/bin/ls -alt

The best would be to add /bin in the PATH environment variable.

Jay jargot
  • 526
  • 2
  • 6