Some people may not realize there are a lot of Linux commands that work within PowerShell. I thought I would list some of them for people to try. I...
For further actions, you may consider blocking this person and/or reporting abuse
It’s a great resource. Recommend that you change the commands with markdown code using the back ticks. Also, believe if you run
Get-Alias *
, you should get a list of all these Linux native commands that have been used to represent a PowerShell command.what about operators such as
|
(pipe)>
(create from scratch) or>>
(append to file or create)?also, if
sed
orgrep
orawk
would work in there too, I might update some of my bash scripts to work in PowerShell too. Thanks.P.S. it'd be cool if
${1}
and other variables are reachable as well, having just commands but no way to cross send parameters via shell is 1/3rd as useful.These aliases trip me up. If I type
rm -r -f *
I get an error about ambiguous arguments between-force
or-filter
, and I need to change the flag torm -r -fo *
.I also lost half an hour figuring out why
curl
was respecting the system default proxy in one terminal window but not the other. After that I turned off a bunch of aliases.Did you try
rm -rf <file or dir>
? That’s what I usually use if I’m in PowerShell.I tried it; I get
Remove-Item : A parameter cannot be found that matches parameter name 'rf'
. TheRemove-Item
cmdlet doesn't have a param starting withrf
... Is yourrm
not aliased toRemove-Item
?I was surprised to learn I could create a file via
touch
. It's not quite as cool as PowerShell'sNew-Item
but it totally worked. Touch didn't make the list here but it got me thinking and that's how I found this post. Thanks for writing it!Excellent! thank you for listing these, just started using the new Windows terminal and I have much love for it
What about netstat? That also works in linux and windows.
I generally use
ifconfig
...Really useful, not: finger.
finger works for me? weird. Here is the doc for using it from MS.
docs.microsoft.com/en-us/windows-s...
Who runs a fingerd nowadays?
To be honest, I have no clue. But it it worked as I ran through all the commands I could think of.
some of them work in cmd also like ping, cd, ssh and mkdir.