Or any other alternate shells that aren’t bash?

  • lordnikon@lemmy.world
    link
    fedilink
    English
    arrow-up
    57
    arrow-down
    1
    ·
    23 days ago

    The idea of someone using powershell when you are on Linux is a form of self harm and you need to reach out as its clearly a cry for help.

    • Euphoma@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      14
      arrow-down
      1
      ·
      23 days ago

      Why not? It seems like a well supported shell on windows that isn’t terrible.

    • jollyrogue@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      23 days ago

      Because I have to admin Windows boxes and M365. There are PS modules for lots of different MS things.

        • JackbyDev@programming.dev
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          2
          ·
          23 days ago

          The practical purpose of asking is to get a feel for how many people use it.

          Less tongue in cheek though, it sounds like you have the same questions as OP. If you’re curious what might be the practical purpose, why not ask people who use it why they do instead of berating OP for asking if anyone uses it?

          • just_another_person@lemmy.world
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            23 days ago

            Well by that logic, it’s a way for Windows users to not learn the native tooling available, but not skip any steps. It doesn’t make any sense.

            Learning Powershell in a Linux environment is going to just absolutely be a crutch and fuck up your ability to interact with other Linux systems that don’t share your particular environment.

            • JackbyDev@programming.dev
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              1
              ·
              23 days ago

              As someone who used bash on Windows through MSYS, I don’t see the issue. It was different, not inferior, to cmd and PowerShell. If someone wants to use PowerShell on Linux why be such a condescending jerk about it? Sometimes people just wanna try things for the fun of trying new things.

    • DasFaultier@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      23 days ago

      If you run VMware, you can use PowerCLI to interact with your vSphere servers, and PowerCLI requires PowerShell and uses similar syntax. I haven’t tried it on Linux yet, but I would assume that that might be a valid use case.

        • DasFaultier@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          22 days ago

          It’s been a while for me and i can’t try things out atm, but i think vSphere SSH access is only for managing the appliance itself, not objects like VMs in a vSphere cluster. For that, you would have to use the Python SDK or PowerCLI.

  • chrash0@lemmy.world
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    23 days ago

    i’m a big nushell fan.

    i was once sitting where you are. when PowerShell was released on Linux i thought about switching and read the manual. i really liked some of the philosophy:

    • descriptive names for commands. cat and ls have canonical short names to save disk space on the systems they were created for. this is no longer a constraint and aliasing a longer command name is better than “git gud n00b” when it comes to discoverability.
    • structured data. “everything is a string” is great when programs play nice. it breaks apart when programs prefer human readable output or worse don’t provide structured output, like format=json or whatever.
    • modern control flow semantics. yes, pipes are great, let’s keep those, but why do i have to rtfm every time i want to bang out a simple script with an if-else control flow?

    i looked around at a few solutions. xonsh uses Python. eshell is integrated into emacs and uses Elisp. i briefly tried to hack something together using Kotlin Script. and yeah, i tried PowerShell.

    i settled on nushell not just because it fulfilled the above requirements, but also:

    • simple data types. string, number, list, record, and table are about the only types you deal with.
    • wide support for structured data. JSON, YAML, TOML, CSV, etc have parsers built in. jq and other such tools are made irrelevant because you just load it into nushell query with a unified DSL using common syntax like select and where.

    honestly, these are the killer features. there are so many more. context aware autocomplete, modules and overlays, super easy custom completions, extension functions (one of my favorites is git remote open), cross platform (if you’re forced to use Windows), plugins, and i can contribute since i do Rust development for work.

    give PowerShell a shot, but i think nushell is the happy medium

    • flying_sheep@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      22 days ago

      Finally! Nushell is awesome. The infrequent deprecations are a bit annoying, but I prefer them to having a bad program go 1.0

    • zarkanian@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      22 days ago

      cat and ls have canonical short names to save disk space on the systems they were created for.

      I thought it was to save on keystrokes due to slow transmission speeds.

  • eldavi@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    23 days ago

    i ws forced to do it recently and noticed that they enforce usage of black terminal, like it is in the command prompt in windows.

    it was a pain in the ass to keep switch colors just to touch that one powershell module and my first priority to replacing with with a python equivalent. they still think that the powershell module is being used, but it’s no longer capable of working in this environment and they’re going to have to spend $$$ to make it useable because i forsee LOT of difficulty and delays in bringing it up to spec.

  • Sina@beehaw.org
    link
    fedilink
    arrow-up
    4
    ·
    22 days ago

    Basically no one is using powershell on Linux. zsh is popular and i’m using fish.

  • dil@lemmy.zip
    link
    fedilink
    arrow-up
    3
    ·
    23 days ago

    Fish is the cachyos default, I used oh my zsh too, I honestly cant tell a difference as a non dev end user

    • gaylord_fartmaster@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      23 days ago

      I tried fish before switching to zsh because it has much better compatibility with bash, and I think bash/zsh handles a lot of things like aliases way better. I’m also on CachyOS and the default zsh config with ohmyzsh and powerline10k it comes with is great.

  • Heavybell@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    22 days ago

    I use it for some things. It’s good for file batch processing, for example. I could probably do those things in python but I use C# and powershell at work so I know .net better.

  • Tapionpoika@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    23 days ago

    It is not always Bash. Zsh comes as a default with some Arch based distros like Manjaro (xfce) and Garuda, plus Kali of course. But what is the point to use PowerShell in Linux? … Azure, Exchange or Windows servers or something else I don’t get?

  • Mugita Sokio@discuss.online
    link
    fedilink
    English
    arrow-up
    2
    ·
    23 days ago

    My producer and I personally use Bash. We tried zsh, but that didn’t treat us very well. Fish is actually pretty nice, though.

  • stiltonfondu@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    23 days ago

    I use PowerShell on Linux for work stuff. We maintain a set of Azure deployment scripts that were originally developed on PS 4 and 5 for Classic Azure. They’ve been migrated to AzureRM and now PS Core and Az. The scripts are now fully cross-platform.

    We even use some PS remoting over SSH for remotely deploying stuff on Linux VMs where we run some bash commands for configuration.

    I started with bash scripting years ago and never really used PS for Windows or exchange server admin. Just in the last decade for Azure stuff.

    Sounds weird and horrible but it’s fine.

    Bash is still home

  • Mactan@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    22 days ago

    only for extraordinarily cursed situations where games need it in wine/proton

  • Doorknob@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    22 days ago

    I tried to use it for admin in a Windows environment, but half the modules I needed wouldn’t work in Linux which made it pretty much useless.