Command 'ls' not working in windows Getting an error while executing 'ls'
'ls' is not recognized as an internal or external command, operable program or batch file.
Command 'ls' not working in windows Getting an error while executing 'ls'
'ls' is not recognized as an internal or external command, operable program or batch file.
Use the command dir
to list all the directories and files in Windows; ls
is a unix command.
Please follow below steps to fix this
download and install git https://git-scm.com/downloads.
After git installation is completed,navigate to folder where git is installed. Check in C/Program Files Folder. Navigate to C:\Program Files\Git\bin
Add the above location (C:\Program Files\Git\bin) in path variable in system environment variables.
Restart cmd and try to run ls and other Linux commands.
It should work now!!`
ls(List)
command in windows.ls
command use dir(Directory)
command.
This command also displays the total number of files and directories
listed.NOTE:
We can use ls
command in Windows PowerShell
. It works in PowerShell, shows the files and directories listed.
© 2022 - 2024 — McMap. All rights reserved.
ls
is aliased todir
in Powershell, maybe that's where you've seen it being used? – Shadrach