you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 1 year ago (1 child)

I can't tell you what -r and -n do, because those are option flags. They mean different things depending on the command you're running.

Imagine you're going to zip a file. That is, put a file in a compressed archive. You'll probably right click on the file, on the menu that pops up you'll click Compress..., and then WinZip pops up with text boxes to type in the name of the zip file, it probably defaults to name_of_file_you_right_clicked.zip but you can change it, maybe some check boxes for different options like if you want to password protect the archive, etc.

In a command line interface, the first thing you type is the command you're going to run, then usually flags (which are like check boxes) or options (which are like text fields or dropdowns, you need to type in additional information after options) and then the name of an input file, and then the name of an output file. The terminal has a built-in manual, you can read about a particular command's options by typing man [command]

Don't know what command you need? The apropos command will search the manual for keywords. Say you want to use the command line to convert some image files from one format to another, but don't know what command can do that. If you type apropos -a image format convert it will search the entire manual for entries, and this will probably return the commands convert, magick, and magick-script among others. Those are commands from the ImageMagick suite. Note the -a. In this case, it stands for and, it will cause apropos to only return commands whose descriptions match all of the keywords you type in. If you don't put that -a, and only type apropos image format convert you'll get a much longer list of commands that include at least one of those keywords. Apropos, of course, has a manual page, which you can read with the command man apropos.

Let me really bake your noodle now: The terminal is a programming environment. Bash is a programming language. You can create variables, use if, for and while statements, do arithmetic, etc. You can use a text editor to save your programs as files, traditionally with a .sh extension, to run them later. This lets you automate...basically anything. Moving files around, converting files from one format to another, using programs like ImageMagick, ffmpeg, or several others to edit photos, videos audio clips, whatever. For publishing pictures to my blog, I've got a script that takes a photo, reduces it in size by half, adds a watermark, and saves the result to a special folder. And by using a .desktop file, I added that script to the right click menu, so it's an option like Open, Open With... etc. So I run that script from the GUI.

There's a reason most Linux distros come with an easy way to get to the terminal, usually a launcher on the panel or desktop. It's because it is a powerful end-user tool.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago

    Because of all your explanation, Terminal should never, ever be touch by the average user. The historical reliance on terminal is the reason that Linux adoption rates have been low.

    Linux is a far better system to use for most home users that windows or Mac but terminal is beyond the capabilities of 97% of people.

    I have a 11 year old low-end laptop running Mint. All I did was max out the RAM and pop in a SATA SSD. It's stable, easy to use, and fast.... until I have to hit terminal. Then it's hours of looking up commands online, trying to figure out how to get something done that should have an easy GUI. I'm not a programmer by any means. I'm just cheap and don't feel like tossing out perfectly functional hardware. So I push through it until I get it working.

    Yes most of the 3% of people that use the Linux can mostly use terminal easily. For the 97% of people who are not using Linux, terminal is way beyond their capabilities.

  • source
  • parent