this post was submitted on 19 Sep 2023
177 points (89.7% liked)

Linux

48343 readers
370 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

edit: hey guys, 60+ comments, can't reply from now on, but know that I am grateful for your comments, keep the convo going. Thank you to the y'all people who gave unbiased answers and thanks also to those who told me about Waydroid and Docker

edit: Well, now that's sobering, apparently I can do most of these things on Windows with ease too. I won't be switching back to Windows anytime soon, but it appears that my friend was right. I am getting FOMO Fear of missing out right now.

I do need these apps right now, but there are some apps on Windows for which we don't have a great replacement

  1. Adobe
  2. MS word (yeah, I don't like Libre and most of Libre Suit) it's not as good as MS suite, of c, but it's really bad.
  3. Games ( a big one although steam is helping bridge the gap)
  4. Many torrented apps, most of these are Windows specific and thus I won't have any luck installing them on Linux.
  5. Apparently windows is allowing their users to use some Android apps?

Torrented apps would be my biggest concern, I mean, these are Windows specific, how can I run them on Linux? Seriously, I want to know how. Can wine run most of the apps without error? I am thinking of torrenting some educational software made for Windows.



Let me list the customizations I have done with my xfce desktop and you tell me if I can do that on Windows.

I told my friend that I can't leave linux because of all the customization I have done and he said, you just don't like to accept that Windows can do that too. Yeah, because I think it can't do some of it (and I like Linux better)

But yeah, let's give the devil it's due, can I do these things on Windows?

  1. I have applications which launch from terminal eg: vlc would open vlc (no questions asked, no other stuff needed, just type vlc)
  2. Bash scripts which updates my system (not completely, snaps and flatpaks seem to be immune to this). I am pretty sure you can't do this on Windows.
  3. I can basically automate most of my tasks and it has a good integration with my apps.
  4. I can create desktop launchers.
  5. Not update my system, I love to update because my updates aren't usually 4 freaking GB and the largest update I have seen has been 200-300 mbs, probably less but yeah, I was free to not update my PC if I so choose. Can you do this on Windows? And also, Linux updates fail less often, I mean, it might break your system, but the thing won't stop in the middle and say "Bye Bye, updates failed" and now you have to waste 4GB again to download the update. PS: You should always keep your apps upto date mostly for security reasons, but Linux won't force it on you and ruin your workflow.
  6. Create custom panel plugin.

  1. My understanding is that the Windows terminal sucks? I don't know why, it just looks bad.

I am sure as hell there are more but this is at the top of my mind rn, can I do this on Windows. Also, give me something that you personally do on Linux but can't do it on Windows.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 1 year ago (4 children)

Possibly dumb question, but... can Windows pipe things? Like, can I pipe a grep to a text file, or send stdout to a text? Or, like, tee a command onto the end of a config? I don't use this a lot in Linux, but I have never done in Windows and literally don't know if it can be.

[–] [email protected] 10 points 1 year ago (4 children)

In powershell, kinda -- but it's unpleasant. Everything is an object which you pipe between commands, but it's not a text stream so the receiving end has to explicitly understand what it's receiving.

[–] FigMcLargeHuge 9 points 1 year ago* (last edited 1 year ago) (3 children)

Is it just me, or is powershell fucking horrible?

[–] [email protected] 5 points 1 year ago

Personally? I hate it.

Anytime I have to deal with it I usually just write a bash script that writes a horrific unrolled powershell script rather than dealing with ps data structures.

[–] [email protected] 4 points 1 year ago

It's WAY better than batch (not to be confused with bash) scripting. It's got some really nice features though and lacks a lot of the small paper cuts inherited from legacy shells. Look at nushell for something similar on Linux.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Speaking as a Linux fanboy (since '98), I actually like PowerShell (the language/scripting part of it, not the shell part). I use it for work primarily, and love the object-oriented approach. It may not shine when you're dealing with plain-text-output binaries (say, if you're running some cross-platform cli tool), but when you're working with PowerShell's built-in cmdlets, or you're processing structured data like JSON or CSV, that's when it's object-oriented nature really shines. Once you load up your data into a variable, you can just use the object.property syntax to access various properies, or even use some built-in methods to perform actions on the object

Also, if you want to filter and format the output text, there's various ways you can mess around with it to display the data however you want to - whereas in traditional nix shells you'd have to mess around with a different grep/sed/awk expressions every time - and in doing that, you'd lose the information as the text goes thur the pipeline.

One of my favorite features is Out-GridView, which displays a graphical table containing whatever you piped into it, which allows you to do a live filtering of data, or a graphical selection for input - say I pipe a CSV file into it and selected a few rows from the table, I could pass the selection onto the next command in the pipeline.

Here's a one-liner that illustrates how powerful this can be:

Get-Process | Out-GridView -PassThru | Export-Csv -Path .\ProcessLog.csv

This above lets you select multiple processes from the Out-GridView window. The processes that you select are passed to the Export-Csv command and written to the ProcessLog.csv file. I can't even begin to imagine how you'd archive this natively in a standard Linux environment without relying on a third-party tool, or writing an overly complicated script that may depend on other languages like Python.

[–] [email protected] 9 points 1 year ago* (last edited 1 year ago) (1 children)

The object nature in PowerShell is pretty powerful though. Piping JSON in PowerShell is, IMO, quite nicer than having to put ~~new ~~ jq commands as very other stage of the pipe in Linux.

edit: just noticed autocorrect changed 'jq' to 'new' in my original post.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)
[–] [email protected] 1 points 1 year ago (1 children)

I wouldn't agree with that. I find jmespath syntax far more intuitive than jq, and it would appear to be easier to embed as basically every CLI utility I use that natively supports a JSON query to filter its output uses jmespath syntax rather than jq. It's just not so readily available as a standalone solution as jq. But regarding PowerShell, I can pipe JSON command output to convertfrom-json and I get a data structure back. I find that having a data structure for more complex nested loops is easier to deal with than having to call jq repeatedly in every layer of my loops. At that point I'd rather use Python on Linux, but I can do it natively in PowerShell.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

valid argument - maybe jq isn't always the best tool for the job ... but i personally been happy with using it

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

[This comment has been deleted by an automated system]

[–] [email protected] 0 points 1 year ago

Pure FUD. Worse, it's wilfully stupid.

Are you in the habit of picking pipeline commands at random? Do you not usually have a purpose in mind? OBVIOUSLY the receiving end has to understand what it's receiving, or what the fuck are you even doing?

Do you believe that your text processing commands don't have to understand what they receive?

Let's get the ports of the node container.

Bash:

docker ps | grep node | cut -n 6 -f ' '

Pwsh:

docker-ps | where name -eq 'node' | select ports

First the grep command shits the bed because at some point you started a new container running a nodejs image.

Then the cut command fails because you had a container with a space in the name, so it outputs mounts instead of ports.

That's a non-issue with sematic tools. Semantic tools are also legible. Yeah, I can figure out what that awk command does, but it's meaningless unless I also know the shape of the data is supposed to operate on.

You don't write "USE 2nd DATABASE; SELECT 3rd COLUMN FROM 10th ROW", do you? Why would you want to do that in a shell?

[–] [email protected] 2 points 1 year ago

I use bash and fish natively on Windows and it obviously works in those. You can also use nushell natively and that has piping as well.

I'm explicitly saying natively because most people assume that I'm talking about WSL when I say I use bash on Windows. I am not, msys2 allows you to use these things natively without a VM.

[–] [email protected] 1 points 1 year ago

No, and it makes inter process communication a removed. You're basically forced to use a tcp or udp socket on local host.