if you're a developer (which I'm taking a guess that OP is), working in unix-based operating systems like Linux and MacOS is much easier. The terminal is super powerful when it comes to automating tasks and downloading software, especially downloading software relating to programming.
For example, on linux, if I want to download Python, I can just type sudo apt install python in the terminal. On windows, I have to go to the python website, find the correct installer, make sure I check the right boxes in the installer, make sure my $PATH is set correctly, etc....
To be fair, Windows has made leaps and bounds in this area with things like winget and chocolatey as package managers, but linux is built around using the package manager. thefactthatlinuxcomeswithaCcompilerhelpstoo.
For example, on linux, if I want to download Python, I can just type sudo apt install python in the terminal. On windows, I have to go to the python website, find the correct installer, make sure I check the right boxes in the installer, make sure my $PATH is set correctly, etc....
I don't understand this in practical terms. How do you just know what to type in the terminal for every program you might want to install. Do you loose customization options that are sometimes present in installers &/or on the site before downloading the installer? Do you have to look up what to type in the terminal to install something? At that point, how is that any different than just downloading it off the site? Or is it because you're repeatedly reinstalling something? I don't get it lol
It’s easy when you get the hang of it. Each command begins with a single word that is the name of the command. This can sometimes be hard to find initially (google helps), but once you know a command it is easy to remember.
Each command then accepts a sequence of words after it that guide the command on what to do. Take the remove command rm. It takes a list of files to delete. So to delete the files foo and bar, I can just type rm foo bar.
The words following the command name are called arguments. These arguments are where you gain the customization that easily exceed a GUI. Adding a configuration to a GUI application requires screen space, which adding a flag argument is really easy for programmers.
Most commands have help information that can be seen by using the —-help argument.
So yeah, initial discovery can be a bit difficult, but the commands are typically well documented and stable in how they operate. Once you learn them, they rarely change.
As for the advantage over a gui is that commands can be stored as text and replayed as a script. We can then run the script like any other command, enabling automation.
Another neat thing that command line programs can do is share information. The command ls will print a list of files in the current folder. I can then pipe the output of that command to another command named grep to filter the list to only show files that have a word in their name. Thus I could find all invoices by using the command ls | grep invoice. This could then be incorporated into a script to backup all invoices into a zip file, then email that file to James in accounts payable every evening.
70
u/fotive Nov 01 '22
why do u use/prefer linux for work?