Panda_User
Panda_User

Reputation: 199

Anaconda Prompt command line commands

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

Answers (2)

Ali Naderi
Ali Naderi

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

Post169
Post169

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

Related Questions