How can I get better at the CLI?
How can I get better at the CLI?
Focus maybe on some CLI tools, like text editor. I use Vim, it was pain to learn but been worth it, since you don't have to leave the keyboard for anything. Once you learn the layout you can use it in other IDEs that also, many have plugins or built in support for Vim layout (JetBrains IDEs do) so I can use the same key map in desktop apps to do C# and C++, etc..
Also use Vim Mode that mode in the https://obsidian.md/. Which is great since you can also use Vim in the CLI to edit the Markdown Files.
Good Vim Cheat Sheet, bit confusing but as you get use to VIM it makes more sense.
http://materials.ucsd.edu/doc/vim_cheat_sheet_for_programmers_screen.pdf
Also this book is pretty handy, the 3rd edition dropped GUI apps and focuses 100% on CLI.
https://linuxpocketguide.com/
Handy if you have a Steam Deck also.
My biggest suggestion is to use cli tools, read man pages, start with man man, install info pages and use a tool like tldr.
Like everything else one wants to learn, the best ist to practice and learn through finding better solution for own made failures.
@LynnTheChaoticWitch you could try some games to help you learn if you like gamified methods.
I recommend replacing GUI apps that you use one by one with CLI apps, I started by changing my file manager to ranger. Don’t rush or you may get overwhelmed and don’t interrupt your workflow too much. Next I started using media players, video editors, and even steamcmd to launch games, try to find a replacement for GUI apps searching online. This list is a good place to start;
Lots of people are suggesting using TUI applications.
While I don't disagree that will make you more comfortable spending time in the terminal, you're not really getting better at the command line (CLI).
I recommend you learn the basics of how the shell works. This is a good resource: https://effective-shell.com/
Learn to like not having to use your mouse. Only use your mouse as a last resort. One strength of CLI is almost never having to move your hands off of the homerow. Fuzzy finding is your friend.
For example:
First thing I'd do is ditch the GUI file manager: get comfortable with cd, ls, mv, rm, etc.
After that, maybe start with basic text manipulation, like grep, awk, sort, uniq, etc. This ties in nicely with IO redirection, which is essential for a "CLI based workflow." Get comfortable with pipes and file redirection, it's extremely powerful!
Writing shell scripts is another super useful exercise: any time you find yourself running the same set of commands multiple times, think about making it a shell script. You may end up with some really useful little custom tools that way.
Start to use command line tools like mutt, links and so on. Okay, maybe not links, but mutt is still the best MUA around.
And whenever you are asked to get some data out of an excel sheet, export it to csv and use sed, awk, grep, wc, cut, uniq, sort, head, tail and stuff.
No, stuff is not a command afaik 😁
Someone already mentioned The art of command-line. It’s a start.
And just use it… you’ll get better at it with time and practice.
Also, make sure your use of the CLI enhances your workflow, or it won’t work.