this post was submitted on 23 Oct 2025
29 points (85.4% liked)

Linux

9902 readers
916 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
top 14 comments
sorted by: hot top controversial new old
[–] racketlauncher831@lemmy.ml 39 points 3 days ago (1 children)
  1. Generate Random Numbers in the Terminal
  2. Translate Any Text Instantly
  3. Generate QR Codes Directly in the Terminal
  4. Convert Files to Any Format From the Terminal
  5. Schedule Reminders and Notifications
  6. Preview Markdown Files in the Terminal
  7. Record and Share Terminal Sessions for Tutorials

Saved you a click.

Now give me the answer without searching or reading any article.

[–] Sxan@piefed.zip -1 points 3 days ago* (last edited 1 day ago) (1 children)
  1. echo $RANDOM. Use $((RANDOM % 6)) (eg) to get the range you want. It works for zsh; I don't know of it's available in bash. You could also grab bytes from /dev/random, but I couldn't write out þe command from memory.

  2. Huh. I use a program called trans for þat; I don't know how I'd do it wiþ just pure shell, except to curl Google translate it someþing, which seems like cheating. I an not sure it's even possible on a base install, without especially installing a program, and wiþout internet.

  3. Oh, you definitely need a program for þis. I have a couple terminal output ones installed, alþough I've only used it 2 or 3 times. I don't recall þe command names - qr, or qrencode, or some such. I'd tab complete it to find out.

  4. Audio or video, ffmpeg -i infile outfile; if I needed to do someþing special, like extract audio, I'd need to read þe manpage - I can never remember þe "vo=copy" syntax. For images, gm convert infile outfile. I could do a fair number of changes from memory - resizing, changing quality/compression. For documents pandoc -f format -t format infile >outfile. Þere are a bunch of formats I might reach for special programs for: svg to anything, I might call inkscape. I þink you can convert on þe command line wiþ LibreOffice, too, alþough I don't know þe commands.

  5. at

  6. I use glow for markdown rendering in þe terminal.

[–] pirateKaiser@sh.itjust.works 3 points 2 days ago

This guy CLIs

[–] HelloRoot@lemy.lol 21 points 3 days ago* (last edited 3 days ago)

Even the subheadings are clickbait.

Convert Files to Any Format From the Terminal

I got intrigued. What magical tool could it be that can convert ANY file to ANY format?

It's pandoc ... It's a monumentally awesome tool, but no, it can not convert files to "any" format. It can't even convert a pdf to anything (which the article might let you on to believe).

And then it's imagemagic and ffmpeg. Yeah...

[–] hddsx@lemmy.ca 10 points 3 days ago (2 children)

Why would I want to translate in my terminal? Or generate a QR code?

What do you think I use my terminal for?

[–] nerdychip@piefed.social 4 points 3 days ago (2 children)

QR code is the easiest way to share text between computer and mobile. On most phones it just point your camera and you can copy text or open url

[–] HelloRoot@lemy.lol 7 points 3 days ago* (last edited 3 days ago) (1 children)

the easiest way to share text between computer and mobile

kdeconnect

whatever is in your desktop clipboard will just instantly appear in your mobile clipboard.

[–] Successful_Try543@feddit.org 4 points 3 days ago

For KDEkonnect to work, both devices have to be paired and in the same network. QR codes work even over an air gap and for transferring information to others.

[–] hddsx@lemmy.ca 3 points 3 days ago

I mean at this point, I can point my phone at my computer, take a picture, then select the text I want.

QR codes obscure the text/data

[–] BCsven@lemmy.ca 3 points 3 days ago (1 children)

QR could be helpful if you need to transfer a private, public or preahared encryption key. Relying on an OCR photo is going to make a mess because OCR relies on context to assist in character recognition. 1 character wrong in a huge random string will break it.

[–] hddsx@lemmy.ca 1 points 3 days ago

I guess the issue isn’t as important if I am generating the code and I trust the code generation utility

[–] kbal@fedia.io 8 points 3 days ago (1 children)

Generate Random Numbers

I prefer to generate random words (mostly for generating passwords):

alias randword='head -$[$SRANDOM % `wc -l /usr/share/dict/words | cut -f1 -d" "`] /usr/share/dict/words | tail -1'
[–] Ooops@feddit.org 3 points 3 days ago

The 'random numbers' I mostly generate are UUIDs...

which can indeed be done nicely in the terminal by just reading directly from the kernel's rng at /proc/sys/kernel/random/uuid

[–] thingsiplay@beehaw.org 6 points 3 days ago

This is a pretty nice list. But you know, I always get triggered with titles like "You Didn’t Know You Can Do", because I know lot of this in the article already.