7 Useful Things You Didn't Know You Can Do in Your Linux Terminal

The Linux incurable isn’t just for internet server maintenance, product admins, or paper taking care of. It’s a effective, functional really feel where you can be effective, smart, and even have some enjoyable. Allow’s study 7 fashionable and usable points you can do proper presently that unveil a whole new side of your incurable.
Table of Textiles
- 1. Accumulate Random Figures in the Incurable
 - 2. Interpret Any kind of Text Immediately
 - 3. Accumulate QR Codes Uninfluenced in the Incurable
 - 4. Transform Records to Any kind of Layout From the Incurable
 - 5. Itinerary Pointers and Notifications
 - 6. Creep glimpse Markdown Records in the Incurable
 - 7. Record and Share Incurable Sessions for Tutorials
 
1. Accumulate Random Figures in the Incurable
Sporadically you care a arbitrary number, such as for a password, a sample dataset, or perhaps to earn a quick judgment. You can open a internet browser and browse for a arbitrary number generator, but if you are on Linux, then why run away it once you currently have a constructed-in treatment?
The Linux incurable has a couple of constructed-in medians to collect arbitrary numbers, and my personal favored is utilising the $RANDOM variable. It’s an internal Bash ethical that confers a unalike integer in between 0 and 32767 every time you telephone call it. It’s ridiculously moderate, just kind this and press Get in:
echo $RANDOM
That’s it! A arbitrary number appears. Do it again, and you’ll avail an additional. Yet what if you care a number within a fussy hodgepodge, enumerate in between 1 and 100? To attain this, you can earn utility of a tad of math via the modulo motorist (%) to constrict the output:
echo $((RANDOM % 100 + 1))
Here, the modulo motorist (%) retains points within your thirsted hodgepodge, and encompassing 1 makes certain you don’t avail zero.
Conversely, if you want added manipulate and want to avail dissimilar arbitrary numbers at as conveniently as, you can earn utility of the shuf command:
shuf -i 1-1000 -n 5
This confers you 5 arbitrary numbers in between 1 and 1000.
What if you care something cryptographically guard? For those flaws, rotate to /dev/urandom. Here’s a command to collect a arbitrary string phenomenal for passwords:
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1
This pipeline filters arbitrary file to entail lone alphanumeric personalities, confiscates the initially 16 of them, and confers you one steadfast password aspirant. You can correspondingly fuse it via dissimilar other commands to avail particularly what you care.
2. Interpret Any kind of Text Immediately
If you care a quick translation, then instead of stoking upwards Google Interpret in your browser, you can carry the power of translation proper proper into your incurable. My go-to tool for this is Interpret Skin, a command-pitch upwards translator that utilises engines pick Google, Overeating, and Yandex.
Initially, you’ll potential care to mount it. On Debian/Ubuntu-based equipments, you can avail it via:
sudo apt install translate-shellFor dissimilar other distros, sift at your package supervisor, it’s commonly there as trans. Once it’s positioned, the enjoyable starts. For instance, to analyze Hello, planet proper into Spanish, kind:
trans :es "Hello, world"
If you’re unsure what language you’re squaring, just run away out the source language code, Interpret Skin is justifiable enough to number it out. Yet, you can earn utility of the colon designing to exemplify source and target languages, such as:
trans en:es "How are you?"
if you don’t want added niceties dissimilar other than translation, earn utility of the -b treatment in the previous command pick this:
trans -b en:es "How are you?"
You can even analyze whole documents. For instance, if you have any kind of arrangement paper via remarks written in German, instead of plagiarizing and pasting each pitch upwards, just run this:
trans :en < config.confIt interprets the whole thing proper there in your incurable.
Interpret Skin correspondingly administers added than unassuming translations, such as interactive rind ensconcing (trans -shell), where you can analyze constantly and earn utility of it interactively:
trans -shellPlus, you can correspondingly earn utility of text-to-speech earn utility of and dictionary ensconcing, which perform chatted translations and laid out interpretations.
3. Accumulate QR Codes Uninfluenced in the Incurable
QR codes are a doable way to share URLs, Wi-Fi credentials, or any kind of tad of text. Yet did you realize you can invent your horribly own QR code without ever rejecting the Linux incurable? Donning a tool pick qrencode, you can earn QR codes in secs.
Initially, mount qrencode utilising your default circulation supervisor. On Debian or Ubuntu equipments, run:
sudo apt install qrencodeAllow’s invent a QR code for the Google homepage that displays proper in your temrinal:
qrencode -t ansiutf8 'https://www.google.com'
Immediately, a QR code rendered of text personalities will distinctly appear in your incurable. If you care an real pic paper, perhaps for a website or a demonstration, earn utility of the -o (output) flag:
qrencode -o mywebsite.png 'https://www.google.com'This will distinctly invent a PNG paper in your present brochure.
In enhancement to affiliations, you can correspondingly encode text, contacts, or even Bitcoin addresses. For instance, you can encode Wi-Fi credentials via this:
qrencode -t ansiutf8 "WIFI:S:MyNetwork;T:WPA;P:MyPassword;;"qrencode correspondingly administers improvement establishments, such as readjusting dimension via -s 10 for bigger pixels, acclimating error correction level via -l for much more detailed soundness, and ensconcing the margin around your code via -m.
4. Transform Records to Any kind of Layout From the Incurable
The incurable is an absolute powerhouse once it comes to paper conversion, taking care of everything from images and documents to audio and video documents. Linux tools pick FFmpeg, ImageMagick, and Pandoc can take care of almost anything you toss at them.
For instance, Pandoc is the optimum document converter. It can read loads of formats and write to loads added. You can mount it utilising your default distro package supervisor, Pick on Debian or Ubuntu, run:
sudo apt install pandocNow, let’s enumerate you’ve written a lovely document in Markdown and you care to send it as a Word document. You can convert it via:
pandoc MyReport.md -o MyReport.docxFor images, ImageMagick’s convert command is your Swiss Army knife. You can mount ImageMagick via your package supervisor and earn utility of it for converting, making the most of or resizing images.
For instance, to convert JPG images proper into PNG via ImageMagick, earn utility of this:
convert input.jpg output.pngIn a tantamount way, to resize an pic, earn utility of:
convert input.png -resize 50% small.pngUltimately, for multimedia documents, FFmpeg reigns divine. Revolutionizing video formats, extracting audio, or even amassing GIFs, it’s unanimously plausible. For instance, to extract audio from a video, earn utility of:
ffmpeg -i video.mp4 audio.mp3The tool is so effective that most digital converters mostly earn utility of FFmpeg under the hood.
5. Itinerary Pointers and Notifications
Your Linux incurable can deportment as your personal servant by reserving reminders and notifications proper once you care them. For instance, the at command permits you scheme one-time reminders for a fussy time in the future. Before utilising it, you can care to mount and permit it via the obeying commands:
sudo apt install at
sudo systemctl enable --now atdOnce that’s used, you can package a pointer pick this:
echo 'notify-send "Stretch" "Take a quick 5-minute stretch!"' | at now + 5 minutes
In particularly 5 minutes, a desktop alert will distinctly pop upwards. Here, notify-send collects the alert while at itineraries it. You can correspondingly package reminders for fussy times, such as at 10:00 AM tomorrow or at midday July 4.

For persevering reminders, you can earn utility of cron instead. Open your crontab via crontab -e and add a pitch upwards pick this:
0 9 * * 1-5 notify-send "Daily standup in 15 minutes!"This will distinctly brandish a alert every weekday at 9:00 AM. The 5 areas in the cron phrase significant aesthetic elegances stand for the min, hour, day, month, and day of the week.
If you just care a quick one-time pointer without utilising at or cron, you can earn utility of a moderate secret via the sleep command:
(sleep 3600 && notify-send "Break time" "Get up and walk for 5 minutes") &Chit: Bear in mind that enlighten-send jobs via your desktop’s alert product, so if you’re not in a graphical session, you can care to package the DISPLAY variable or earn utility of dissimilar other strategies pick email, SMS, or logging.
6. Creep glimpse Markdown Records in the Incurable
If you work via documents, READMEs, or notes, you’ve probably run into Markdown. You can preview how it aesthetic elegances proper in the incurable utilising complex Linux command-pitch upwards tools without opening a browser or determine masterstroke.
Twinkle is a wonderful tool that administers Markdown documents via ideal format, encompassing tables, code blocks, and even some styling.
You can commonly grab the latest run away from its GitHub page or mount via the Snap package supervisor:
sudo snap install glowOnce positioned, utilising it is moderate. Simply time it at a Markdown paper:
glow README.mdInstead of a wall of rudimentary text via asterisks and hash symbols, you avail a faultlessly formatted document.
7. Record and Share Incurable Sessions for Tutorials
Sporadically we care to document incurable sessions for complex components, pick demonstrating laid out commands or treatments to close friends or workmates. In either protracting, Linux lends dissimilar tools to document your incurable sessions and share them readily.
Asciinema is perhaps the irreproachable tool for recording incurable sessions. Dissimilar moderate supervise recording, it traps the real text and timing file, resulting in crisp, high-center replays that are readily embeddable on internet pages.
Installation is moderate on most provisions. On Debian/Ubuntu, earn utility of:
sudo apt install asciinemaOn Fedora/CentOS, earn utility of:
sudo dnf install asciinemaAfter installation, initiating a recording is as easy as:
asciinema rec mysession.castOnce you’re completed, just kind exit or press Ctrl + D. You can then tinker earlier the recording in your uncover:
asciinema play mysession.castYou can correspondingly upload your session to the Asciinema internet server proper from your incurable:
asciinema upload mysession.castThis confers you a URL you can share via any individual, that can then sight your incurable session in their browser via phenomenal legibility. Further, if you want to rotate your incurable proper into a shareable webpage, then attempt ttyd command pitch upwards tool.
Final Thoughts
By bringing work pick translation, paper conversion, and even QR code generation proper into the command pitch upwards, you overture utilising the incurable to its full opportunity. In addition, if you want some GUI tools that can match your incurable commands, sift at out this guide.
