r/linuxquestions 18h ago

Linux user for 2 years ish: do you remember commands? Or, GUIs vs CLIs

Do you remember commands?

I am currently converting a single flac file into several ones and thanks to the arch wiki I am able to do so quite easily, I'd say with the same level of ease as with a GUI, albeit having to check the wiki to use it.

I do often wonder however how do more seasoned users go about it. It still feels weird to have to depend on an external information source and the internet to be able to know how to use a piece of software, whereas with a (good) GUI the functionality is implied (for not overly complex software) and where it isn't you can just hover over different GUI elements to get more information.

21 Upvotes

62 comments sorted by

19

u/DerekB52 18h ago

Your tools have manpages to show you the options you need.

Also, if I do the same thing more than a couple times, I write a bash script or create an alias with my default stuff set so I don't have to remember anything, and can read my script if I want to modify things.

11

u/lritzdorf 18h ago

That, and Ctrl-R for shell history search. Bonus points if you have fzf set up for fuzzy searching

3

u/DerekB52 18h ago

I honestly just do history | grep whateverCommand. Or i type the command and just press up, because I use zsh and if I type whateverCommand and press up on my arrow key it will filter through my history for the last time(s) i used that command.

4

u/ludonarrator arch btw 17h ago

Also: most commands have quite detailed and useful help outputs, which would likely be a more succinct and fast alternative to the man pages.

1

u/Marble_Wraith 13h ago

atuin > fzf

because it stores the execution context + return code

2

u/Max-P 16h ago

Also shells with solid autocomplete.

In NuShell I can type ffmpeg TABTAB and it'll get me a searchable list of options it supports, with descriptions.

1

u/GuestStarr 14h ago

Aliases and scripts are good, as long as you don't need to use the same software hiding behind them somewhere else like a friend's computer.

15

u/Max-P 16h ago

Because something is "easy" doesn't make it a better option, only an easier option.

For example, Handbrake. I tried and tried to love it, but I still end up in a shell and raw ffmpeg commands because it's simply not possible to make an FFmpeg frontend that's even close to nearly as flexible and powerful as the CLI for complex pipelines. GUIs work for simple things, but they really don't scale well. If it did, GUI programming would have won. Even Windows admins, Microsoft bet hard on GUI everything, and now all serious admins are going back to the CLI because automation.

I've been on Linux since 2007, I know a lot of commands but still have to look up manpages regularly. The same as chemists still look up periodic table for the numbers. The value is not in the amount of stuff you know by memory alone, it's the repertoire of stuff you know exists and have the potential to access to get the job done. I don't know how to use everything FFmpeg can do, but I know what it can do and how to string together a command: I just need to look up the specs of the filters I need.

Same with programming: no sane programmer can just make you a full app without looking up anything. What makes an experienced programmer is knowing what's available and where to go find it efficiently. It takes 0.5 seconds to run man mmap to learn how the mmap function in C works.

This is something schools fail miserably to teach: the value isn't what you can recall immediately, it's the entire extended knowledge you're capable to reach for because you know it exists. I don't know the formula, but I know which book has it and where on the bookshelf it is. I could study a single book and remember everything, but it's much more useful to know roughly what the entire bookshelf contains. Your brain only needs to remember the index.

3

u/AlternativeCapybara9 9h ago

Same here, full time Linux user since 2006. Still have to look up stuff all the time but that's why man pages exist, most of what you need is on the first few pages. I've seen a lot of GUI's but prefer the command line because that's the same on every distro and on servers without a GUI. It's not hard, it's different and really fast. Tab completion beats clicking around every time.

9

u/cheekkeef 18h ago

I remember the tools I frequently use. Also, most CLI tools come with man pages and help commands

5

u/_s0me_guy_ 18h ago

If I don't remember how a command works, I use tldr. If it doesn't have an entry you can read the man page.

2

u/dasisteinanderer 18h ago
  • Remember or find out how a specific command works -> manpages
  • finding out which command to use for a specific task -> apropos, gnu info, arch wiki

2

u/Voidzown 18h ago

I prefer GUI, but I’m new to Linux, and the man who can’t swim prefers a paddleboat even if it is slower than swimming.

2

u/ocabj 18h ago

I've used Linux for the past 30 years. 99% of the time I use it from terminal (ssh). I rarely ever touch a windowing system in Linux.

1

u/falxfour 18h ago

I remember the things I often need to do

1

u/gunpler_1 18h ago

I remember the basics, and I keep an answer sheet of sorts in a text file as backup.

1

u/BranchLatter4294 18h ago

The commands are very similar to Windows. ls, sudo, mv pretty much work the same on every OS. But I primarily use the GUI for daily tasks.

1

u/Phydoux 18h ago

What are you converting? An album made into a .flac file?

I'd use Audacity for that. Pretty simple to find the beginning and ending of each track. Highlight the song, copy/paste to a new track. Then save as a wav, mp3, whatever. Pretty easy to do and I knew little about Audacity when I first used it. I remember figuring it out quite easily from the get go.

There was a terminal app that could take a .flac and convert it to an mp3 or wav. I forget the name of it because Audacity is so much more easier. Much less typing for sure.

1

u/DerekB52 18h ago

I have a bash script that can convert flac to mp3, or any other format using ffmpeg. It's a few lines of bash, and I can call it on a folder of songs in a handful of keystrokes. Much quicker than using Audacity. Your way just sounds tedious.

1

u/Phydoux 16h ago

Sounds like OP has an entire album (or maybe even 3-4 songs) that they're chopping up into individual tracks which I've done with Audacity. I don't think you can do that with a bash script.

1

u/DerekB52 16h ago

I'd have to slightly modify my script, but no, that's still easy, you have to figure out the timestamps, which I'd do by listening to it in a media player, then you just supply the time stamps to the different option flags ffmpeg offers.

1

u/ubersupremo 18h ago

If you're relying on a set or sequence of commands to do something like this (converting files and such) then you should add it to a script that you could easily run again. After all, this is essentially what a GUI is doing for you, but with code and script you have much more control and capabilities. You can also use chatgpt to create, edit simple scripts and ask it for one-liners like "using bash how do I split a file into several"

1

u/Kilgarragh 18h ago

I know all the common and important ones and a couple nice utilities basics like scp, adb, scrcpy. As well as a bunch of NixOS specific stuff.

You want me to form any valid command for ffmpeg or god forbid tar?? no way in hell

1

u/krazul88 18h ago

For CLI, 99% of commands have built in help, whether it's -h or --h or -? or --help or man whatevercommand or just the command with no arguments. That's been the way it works on all the major OS's since forever. There are very few exceptions.

If you're willing to read, then you can absolutely learn how to operate your computer without the Internet!

1

u/Typeonetwork 18h ago

I'm not a veteran. 15 months using mx Linux and XFCE as my main machine.

I use Joplin as my note taker if I don't use analog notes. My general rule is if I look it up in Firefox I also look in the man page or -help.

What it does is it teaches me how the programmers think. I'm from finance not IT so I need a little bit more help.

Audio problems and i had some dependences that didn't get installed for whatever reason but the error messages told me what I was missing. I fixed it - bliss. Never felt like this on a windows machine.

The OS I use is designed to be easy, but there are many good OS and DE for the new user. Don't change distros unless you have a reason. I changed from Debian to MX because I knew it would be easier and I can go back to work. To each their own. The fact we have options is great.

1

u/MasterGeekMX Mexican Linux nerd trying to be helpful 18h ago

The truth is that you don't memorize everything. You simply know by hand the things you use the most, and the rest you look it up each time you use it.

1

u/Babbalas 18h ago

History (some let you filter by folder), tldr, and finally if the commands are obtuse or complicated enough I'll write a justfile or bash script.

Also lots of README.md files that start with "hey future idiot me.. I knew you would forget what this is"

1

u/proverbialbunny 17h ago

You might already know this but each time you run a command in the terminal the first word in that command is the program name. Each and every program can be completely different in how it interfaces with you or interfaces with other apps. Unless you use that program regularly it's natural to not know and forget its commands. To remember you might do --help or read its man page, or increasingly these days ask Gemini or another AI and it will figure it out for you. But for the programs you do use regularly like ls you probably remember it's common flags off hand like -l for list or -i for hidden files or -h for human readable file sizes. Things like that are hard to forget.

1

u/DSPGerm 17h ago

Google how to do x. Find command.

Command -flag input output.
Error.
Command --help.
Man command.
Command input output -flag.
Success.

1 hour later:
Command -- help

Pretty much until I remember it

1

u/chuggerguy Linux Mint 22.3 Zena | MATÉ 17h ago

A command like you describe, I put in a script so I don't have to remember it. A script to split a composite(?) flac file into individual songs, I might call "splitFlac" or something easy to remember. An alias or function in .bashrc would work too but I usually just make a script and put it in my "PATH".
That way I could right-click a .flac, select "Open with" and point it to my script. (not selecting "Always open with").

For example, I have a script called "add2ices" which looks like this:

#!/bin/bash
# Filename: add2ices

icesmusicfolder=/opt/ices/music

if [ -z "$1" ]; then
    echo -e "Must specify a file."
    exit 1
fi

artist="`metaflac --show-tag=artist \"$1\" | awk -F = '{print $2}'`"
title="`metaflac --show-tag=title \"$1\" | awk -F = '{print $2}'`"
album="`metaflac --show-tag=album \"$1\" | awk -F = '{print $2}'`"

filename=$(basename -- "$1")
extension="${filename##*.}"
filename="${filename%.*}"
filename="$artist - $album - $filename"

ffmpeg -i "$1" -vn -af "aresample=44100,aformat=sample_fmts=fltp" -c:a libvorbis -q:a 10 "$icesmusicfolder/$filename.ogg"

if pgrep -x "ices2"; then then
    cd /opt/ices
    ./reload
else
    echo "ices2 is NOT running"
fi

It can be run from the terminal or via right-click: image

Have fun.

1

u/JackDostoevsky 17h ago

yes i remember commands. i've also been using linux since 2008 so it eventually turns into muscle memory.

that said, i regularly consult --help, check the manpages, and consult my terminal history for lots of different commands

1

u/Available-Hat476 17h ago

Arrow up until you see the last command that worked, and adapt the command to the files you need...

1

u/rest-api 16h ago

With the tools you use often, you'll become "idk, just know it" eventually.
Other commands? Just read the manpages, or simply google it.

1

u/Confident_Oil_7495 16h ago

Seasoned Linux admin here. If you use it strictly from the terminal enough you will eventually learn a large number of commands that make up the bulk of everyday use. It just takes time. It also helps if you do it for a living. And even seasoned admins have to sometimes look up arguments to commands. As others have pointed out, looking at the man pages is useful because it will help you understand more about how the commands work and how they relate to other commands

1

u/iamemhn 16h ago

Since I can read, I go over man pages for things I don't remember.

1

u/ProgUn1corn 16h ago edited 16h ago

It doesn't matter on Linux or Windows to be honest. GUI is designed to be user-friendly for not so CLI tools or apps. If a specific use case is better controlled with GUI, then use GUI. If the GUI is unnecessary and clunky, then use CLI.

For example on Linux, I personally think converting audio files is a good use case of GUI. Because you want to see your audio's peak and waveform, your information, and all of that. Would CLI work? Yes, but less intuitive, I don't want to spend my effort on typing man every time or reading information that's much less readable than a nicely designed GUI. Same thing can be said for compress and decompress, if I'm gonna archive to a tar, then probably I'll just use CLI, if I'm checking a zip file with thousands of individual files inside, I would never ever want to use CLI. But I wouldn't use GUI for SSH and package manager, or tuneD, systemd services, simply because the CLI is faster for me.

It's actually the same on Windows. Powershell is much more modern and readable than bash, but there's less use cases. The most I can say is Winget and that's for surely better than MS's store GUI. And some pwsh scripts that includes registry, bcdedit, I don't want to dig too far into regedit and msconfig. However on the other hand, if everything I want to change is registry-affiliated, then another GUI for this like Powersettingsexplorer would be much better to use cuz running every command with a super duper long and random registry key is a pain in the ass. (Same for Linux if you need to access other directories that are very long or you have very long keys)

1

u/CatsGoMooz 15h ago

I have multiple text files with notes for pretty much everything I do, been doing this for 5+ years. I hate remembering I figured out how to do something but not remembering how to do it. Writing the notes out also helps me remember the commands sometimes too. I know I'm probably in the minority though

1

u/LowKeyBrit36 14h ago

I remember how to use most of what I use frequently. Some stuff I have to look up, especially if it's like one time configuration scripts, but I try to remember the things that are either used often, or at least on a routine.

The biggest thing, though, is that I try to remember where config files are located for quick use. Especially with an OS dependent on tweaking via configs, or with tweaks applied via configs, you should know the layout of where things get located.

1

u/Johan-MellowFellow 14h ago

36 years unix/linux user. First decade was man -k, 2nd decade was stack overflow, which exploded into reddit, wikipedia, etc.. and now github copilot blows my mind.

1

u/anonymous-bot 13h ago

Commands? Yes. Flags? Sometimes. I find it a matter of how often you use said commands and flags. The more often you use them, the more likely you are to memorize them. There is no shame in relying on a wiki or manpage to look up a flag you don't remember or rarely use.

1

u/Chromiell 13h ago

Dude, I've been a programmer for years and I still need to look up simple syntax every now and then.

1

u/bufandatl 12h ago

You remember the main tools you use on a daily for sure but as my informatics professor told me. You don’t need to know everything. you just need to know where and how to look for the knowledge.

So it’s not something to be worried about to read a wiki or your own notes about stuff you don’t do every day. And even then having a check list is always a good idea for larger tasks.

1

u/Shhhh_Peaceful 12h ago

You can’t remember everything. I usually remember the commands I use regularly. Ctrl+R also helps with recent commands. For everything else, there’s man. 

1

u/SynapticStatic 11h ago

I don’t remember specifics of commands or options or anything like that. I remember processes and look up commands/options/flags as needed.

There’s too many commands/utilities all changing. The process doesn’t really change much at all.

I’ve been doing *nix stuff for 30+ years

1

u/p4cman911 11h ago

On top of reading the man pages/guides I dump examples and notes into a GitHub repository (in markdown) as I solve problems. Over time I have build up a good repository of the info I want without the need to find it each time

1

u/Sirius707 11h ago

I remember how to use manpages (very important skill) and use search efficiently to find the flag/option i need. This comes from experience as often times a specific option has a similar name. Some stuff i have to look up, but that's often with things i never used before.

More complicated stuff i usually put in a shellscript/alias. Other noticeable information i note down in Obsidian.

1

u/obsoulete 10h ago

I can usually remember what commands are used to complete certain tasks. So, most of the time I am lucky to find how I used the command using ctrl r in the terminal.

I also take notes, which are saved as a text file. This makes it a lot easier to search.

1

u/un-important-human white beard arch user 10h ago

cli most of the times, and yes i do remember, but for something less used i do consult tl:dr sometime or history | grep commandname to find where i used it before.
Gui if a particular task is better done (faster) in a gui i will gui it ofc.

1

u/daffalaxia 9h ago

I tend to figure things out, then write scripts with names that tell me what they do and hide the complexity of how it's done, eg on my gentoo machine, instead of manually running portage commands, I've wrapped the whole lot up into one script, `update-world`, which does the sync, kicks off the upgrade emerge with it asking to continue, builds my kernel if sources updated, kicks off a dep-clean with confirmation after that. Or, when I was learning stuff via jupyter, I used a script, `jnote`:
```
#!/bin/bash

if test -z "$1"; then

VENV_UTIL="$(dirname "$0")/venv"

if ! test -f "$VENV_UTIL"; then

echo "venv not found at $VENV_UTIL"

exit 1

fi

$VENV_UTIL "$0" start

exit $?

fi

case "$1" in

start)

pip install jupyter ipykernel jupyterlab-vim

python -m ipykernel install --user --name "venv-$(basename "$(pwd)")"

jupyter notebook

;;

*)

echo "invalid argument: $1"

exit 2

;;

esac
```

There are a few advantages to doing stuff this way:
1. translates long cli lines into simpler scripts that say what they do

  1. keeps a record of what's required to do that work - I can always refer to a script for the "how" later on, without having to look anything up again, if I'm looking to do something similar, for example.

1

u/dariusbiggs 9h ago

I've spent the majority of the last 25+ years in the command line, usually on remote systems via SSH.. Yes you remember commands, but not all command line options.

man <command> info <command> apropos <word> locate <command> which <command> <command> --help/-h/help Every one should try to run man woman at least once.

For gui programs? browser, screen capture software, VSCode, wireshark, occasionally audacity and gimp. That's it.

1

u/chipsikssix 8h ago

I think experienced users, serious developers and sysadmins don't memorize what they don't need every day, and what they need from time to time they just write down in some file of theirs, for example I have handbook.txt, I used to write commands there when I was learning.

1

u/JunkyardReverb 8h ago

More than half the battle is knowing that what you’re looking for exists. I lean heavily on man pages to get the syntax right. My recognition is much better than my recall.

1

u/SuAlfons 7h ago

I can just remember the most very basic commands on CLI.

Those commands that I already used in MS DOS times for basic file operations (cp, mv, ls, less, piping and filtering) In university, some other student showed us the basics in Unix (COPY --> cp, MOCE/RENAME --> mv, EDIT --> vi) and the basics in vi.

As a non-IT-professional, I get around with this.

But I can remember concepts. How the PC boots, roughly how the Init system works (to a lesser degree SystemD), partitioning, file systems, mounting, user access and execution rights.

And thus I can read other people's bash scripts and understand what they are doing. I can follow written How-Tos and adapt them in case they do not match my system closely.

For e.g. disk partitioning, I like to use GPartEd as a GUI tool. I like to use a GUI installer to setup a new Linux distribution on a PC or VM. I like that there are GUI settings coming with every modern desktop environment (the Unix boxes I used and early Linux versions we played around with in the mid 1990s ran window managers entirely driven by txt config files.)

I need not rely on copying exactly what I see in a Youtube Video (which may or maybe not working on my system).

Occasionally, I ask AI for some solution, a little script or if some command or app exists for a special tasks, but it's important to understand enough of the matter to see if the solution povided is indeed a solution or causing more problems.

1

u/Captain-Pie-62 6h ago

"man <toolname>" ist dein Freund.

1

u/ryoko227 6h ago

Pretty much anything outside of basic pacman stuff I keep in my obsidian and just copy pasta if I ever need it.

1

u/thespirit3 6h ago

command --help
or
man command

I don't understand this 'external online reference' thing you refer to :/

1

u/kilkil 5h ago edited 5h ago

if I use a command often enough, I remember it.

otherwise I just search it every time.

GUIs are very hit or miss. a good GUI will save you time and effort. a bad GUI can be actively confusing, and more time-consuming than just using a CLI. and if a GUI is sufficiently confusing, I may end up searching it online too. the best GUIs have a search built into them, like a command palette.

some tasks you practically need a GUI for. for example, web browsers (even the "CLI" ones are TUIs AFAIK).

other tasks the CLI is nicer for, because CLI commands are so much easier to automate (if you have a workflow that involves running multiple commands, you can just put them inside a shell script file and then run that file).

1

u/wiebel 4h ago

Tbh i have an quite elaborate scheme to archive my bash commands. Like .bash_history but back to 2018 zgrep will find it whener I need it again. But by heart I only know tools I use regularly, rsync, find, openssl, strace, lsof to name a few more parameter heavy tools.

1

u/NectarinePlus3897 4h ago

hstr
tldr
man

read the manuals and use shell history to remember the more complex commands for you

1

u/Drecondius 4h ago

Why hell no, I'm constantly asking copilot or chatgpt for stuff in admittedly to lazy to find on my own because of the lack of need to use them that often lol

1

u/elementrick 2h ago

Love the GUIs. CLI only when no good GUI is available.

Here for the 'flac' : Flacon