Get Linux utilities like tail,head,cat,cd,ls,cp,mv,rm in Windows directly without needing to manage WSL
Project description
MKCD - Linux Utilities for Windows
Have you ever typed ps | grep edge or wget https://example.com or some other command with Linux utilities, only to find out you are in windows and have to use the stupid PowerShell syntax that no one knows about? You may even be tricked into thinking the command exists because of PowerShell aliases that are nonfunctional. That's why MKCD exists. MKCD brings over 70* essential Linux utilities directly to your Windows command line. No virtual machines, no containers, no hassle.
*not all are available now
Why MKCD?
Working on Windows but miss the power of Linux command-line tools? You're not alone. Whether you're a developer who needs grep for quick searches, a sysadmin who relies on tail for log monitoring, or anyone who finds Windows equivalents just don't cut it, MKCD has you covered.
MKCD provides native Windows executables for all your favorite Linux utilities:
- Text processing:
grep,sed,awk,cut,sort,uniq,... - File operations:
ls,cp,mv,rm,find,chmod,... - System monitoring:
ps,top,df,du,stat,... - Archive handling:
tar,gzip,gunzip,zip,xz,... - And many more:
head,tail,cat,wc,diff,which,whereis,...
No learning curve. No compatibility issues. Just the Linux tools you know and love, running natively on Windows.
Installation
Getting started with MKCD is straightforward, but there are a few important steps to follow:
Note:
ls,cat,curl, etc are mapped as aliases in PowerShell (which can cause confusion when you type something likels -la), but they are removed and readded automatically on install/uninstall.
Step 1: Install the Package
pip install mkcd
Step 2: Run the Installer
mkcd-install
If Python scripts are not on PATH, you can run this:
python -c "import mkcd;mkcd.install()"
Important: You must open a completely new terminal window for the changes to take effect. Simply opening a new tab in Windows Terminal may not work - you need to close and reopen the entire application. If commands still aren't recognized after opening a new terminal, a system restart may be required.
It will ask for permission to launch a UAC window. Type "y", hit enter, then click "Yes" in the window.
Example Output:
Installing mkcd utilities...
Found 61 executables and 20 DLL files
Checking for conflicting PowerShell aliases...
Found 9 conflicting aliases
Conflicting PowerShell aliases detected:
cat -> Get-Content
cp -> Copy-Item
ls -> Get-ChildItem
mv -> Move-Item
pwd -> Get-Location
rm -> Remove-Item
rmdir -> Remove-Item
sort -> Sort-Object
tee -> Tee-Object
Removing 9 conflicting PowerShell aliases...
Updated PowerShell profile: C:\Users\hp\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Removed alias: cat -> Get-Content
Removed alias: cp -> Copy-Item
Removed alias: ls -> Get-ChildItem
Removed alias: mv -> Move-Item
Removed alias: pwd -> Get-Location
Removed alias: rm -> Remove-Item
Removed alias: rmdir -> Remove-Item
Removed alias: sort -> Sort-Object
Removed alias: tee -> Tee-Object
System PATH modification requires admin privileges.
System PATH modification requires administrator privileges.
This will spawn a new elevated command prompt window.
Would you like to request admin privileges? (Y/n): Y
Requesting administrator privileges...
Please click 'Yes' in the UAC dialog that appears.
Admin privileges granted. Operation running in elevated window...
Please check the elevated command window for results.
System PATH modification attempted in elevated window.
Falling back to user PATH for current session...
NOTE: To add manually, type in PowerShell: $env:Path += ';D:\SYSPY\Lib\site-packages\mkcd\_bin\windows_x86_64'
or in CMD: setx PATH "%PATH%;D:\SYSPY\Lib\site-packages\mkcd\_bin\windows_x86_64"
Successfully added to user PATH: D:\SYSPY\Lib\site-packages\mkcd\_bin\windows_x86_64
Note: You may need to restart your shell for changes to take effect. In tabbed terminal emulators like Windows Terminal, you will have to open and close the entire app, not just the tab.
Installation complete! Linux utilities are now available in your shell.
Available commands: ls, cat, grep, sed, gawk, tar, gzip, and many more.
Try running: ls --help
Troubleshooting
Commands Not Found After Installation
- Make sure you opened a completely new terminal (not just a new tab)
- Try restarting your computer
- Check if the installation succeeded by running
mkcd-installagain
ls and grep not being colorized or not working
This may be because your python scripts are not in PATH. To add them to PATH, first type this in PowerShell/CMD to find your Python installation:
python -c "import sys; print(sys.executable)"
Your output should be like this: C:\Python39\python.exe, ending in python.exe. Remove the python.exe part, and add Scripts\ to the end. In this example, it would be C:\Python39\Scripts\. Copy this new scripts path.
Search for Edit the system environment variables in your search bar, hit Enter, then click Environment Variables. In both the "User variables" and "System variables", find where the variable name is Path, then click "Edit" > "New", then paste your copied path. Click "Ok" > "Ok".
You can also run the following command in PowerShell:
$env:Path += ';' + "<your script path>"
No matter which method you choose, make sure to restart your terminal for the changes to take effect.
Uninstalling
To remove MKCD utilities from your PATH:
mkcd-uninstall
Some utilities like
lsandgrepmay stay. This is because they are linked as a script for colorization. Running the previous command will not delete the binaries from your computer.
You will need admin privileges.
To completely remove the package:
pip uninstall mkcd
Requirements
- Windows 10 or later
- Python 3.9 or higher
- Administrator privileges (for installation only)
License
MKCD is released under the MIT License. See the LICENSE file for details.
The MSYS2 project, which provides the underlying tools, is licensed under the GNU General Public License v3.0 (GPL-3.0). MKCD does not include any GPL-licensed code; it uses the MSYS2 environment to compile and run the utilities.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkcd-1.0.6.tar.gz.
File metadata
- Download URL: mkcd-1.0.6.tar.gz
- Upload date:
- Size: 51.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
785b8256c2307d8eb0c8ce3c2d6462526e81142ead5bdaeff71b3791a6dd49b3
|
|
| MD5 |
a54e0f257c00250bd46127af5e536f6b
|
|
| BLAKE2b-256 |
532dbd7743c5b351b8f857bb70c6c4174be4933e4478044cb7d073aff8b5b6df
|
File details
Details for the file mkcd-1.0.6-py3-none-any.whl.
File metadata
- Download URL: mkcd-1.0.6-py3-none-any.whl
- Upload date:
- Size: 51.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d41c1b84c482fcc5d6a2fe1b43a0ea805515d110dfc70b81c9886422714a7895
|
|
| MD5 |
aa31aca50d958d6bec56562de1208f8a
|
|
| BLAKE2b-256 |
cc4e3a64708f601e484477874bbe9b0b5082299705c732e3713e3d99bd8d9f4e
|