hi , welcome to the forum. Which exercise or challenge is this. Please include a link to it.
try exiting the terminal (closing it)
Then click the Reset button next to the Run button.
Then after that, start a new terminal.
Type ls.