Alias for commands #11081

Closed
opened 2026-01-31 02:38:08 +00:00 by claunia · 2 comments
Owner

Originally created by @edoardottt on GitHub (Oct 20, 2020).

Description of the new feature/enhancement

I've used Linux for 2 years. Now switched back to Windows. Is there a similar way to define aliases like in Linux?
In Linux I can go in .bashrc file and append a line like alias command=ls -la and when I type command
in the terminal, it executes ls -la wherever I am in the folder structure.

Proposed technical implementation details (optional)

I don't have any idea... Maybe I can insert the path of the executable in the PATH variable?
I don't know if this is a good idea.

Thanks by the way for all the work you do.

Good work!, edoardottt

Originally created by @edoardottt on GitHub (Oct 20, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> I've used Linux for 2 years. Now switched back to Windows. Is there a similar way to define aliases like in Linux? In Linux I can go in .bashrc file and append a line like `alias command=ls -la` and when I type `command` in the terminal, it executes `ls -la` wherever I am in the folder structure. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> I don't have any idea... Maybe I can insert the path of the executable in the PATH variable? I don't know if this is a good idea. Thanks by the way for all the work you do. Good work!, edoardottt
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 02:38:09 +00:00
Author
Owner

@DHowett commented on GitHub (Oct 20, 2020):

Yes. If you're using PowerShell, look into nal or New-Alias. If you're using Command Prompt, check out doskey.

@DHowett commented on GitHub (Oct 20, 2020): Yes. If you're using PowerShell, look into `nal` or `New-Alias`. If you're using Command Prompt, check out `doskey`.
Author
Owner

@DHowett commented on GitHub (Oct 20, 2020):

Thanks!

@DHowett commented on GitHub (Oct 20, 2020): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11081