Reputation: 199
I recently started using Anaconda Prompt instead of the Windows CLI. I note that standard CLI commands like 'cd' to change directory work in Anaconda Prompt, but other standard commands like 'ls' do not work. How can I list the contents in a directory in Anaconda prompt? Do I have to import the os module or can I do this directly? Thanks
Upvotes: 23
Views: 95275
Reputation: 403
You can use 'dir' instead of 'ls' to list directories and files. In case you prefer Linux commands, install the package below in your Anaconda Prompt, then you can use basic Linux commands as well:
conda install m2-base
Upvotes: 12
Reputation: 708
Anaconda Prompt takes most or all of the commands that Command Prompt takes, plus many that are unique to Conda, which you can both access introductions to and start further exploration of here.
But as darthbith commented, you need to use dir
, not ls
, in Command Prompt and its derivatives.
Upvotes: 20