Tell us about your favorite end tricks, whether they’re productivity shortcuts or fun Easter eggs.

The beginning of a New Year is always a good time to evaluate new ways to improve efficiency. Many people try new productivity tools or figure out how to optimize their most commonly used processes. The terminal is an area to evaluate, especially in the open source world, where there are countless ways to make life on the terminal more efficient (and fun!) with shortcuts and commands. .

We asked the authors for their favorite terminal tricks. They shared some time-saving tips and even a fun end egg. Would you use these keyboard shortcuts or command-line techniques? Do you have a favorite to share? Let us know in the comments.

“I can’t figure out which one is my favorite; I use these three every day:

  • Ctrl + LTo clear the screen (instead of typingclear).
  • sudo !!sudoPrivilege runs the previous command.
  • grep -Ev '^#|^$' <file>The contents of the file will be displayed, without comments or blank lines.” – Mars Toktonaliev

“For me, if I’m using a terminal text editor and I want to throw it away so I can do something else quickly, I can put it in the background with Ctrl + Z, then do whatever I need to do, and then bring it back to the foreground with FG. Sometimes I do the same thing with top or Htop. I can drop it in the background and bring it back to the foreground whenever I want to check the current performance. I don’t switch back and forth between tasks that usually get done quickly, and it really enhances multitasking on the terminal.” – Jay LaCroix

“I often do a lot of the same things in the terminal on a given day, and there are two things that are constant from day to day:

  • Ctrl + RReverse search my Bash history to find commands THAT I have run and want to execute again.
  • The insert number (^Substitution is best because I often do things likesudo dnf search <package name>And then, if I find the right package that way, execute^search^installTo rerun the command toinstallreplacesearch.

It’s definitely basic, but it’s a time saver for me.” – Steve Morris,

“My cool terminal trick is not what I do on the terminal, it’s what TERMINAL I use. Sometimes I just want the feel of an Apple II or an old amber terminal, so I turn on cool-retro-term. Screenshots of it can be found on this website.” – Jim Hall,

“Probably using SSH-X to run graphics programs on other computers. Copy/paste with C-S C and C-S V (on some terminal emulators, such as GNOMe-Terminal). I’m not sure if this is valuable (because it’s interesting to start graphically with SSH). Recently, I needed to log on to another computer, but my kids could see it on the laptop’s big screen. This link showed me something I’d never seen before: mirroring an active session from another computer screen (X11VNC-desktop) from my laptop over a LAN, and being able to control it from both computers at the same time.” – Kyle r. Conway

“You can install SL ($sudo apt install sl or $sudo DNF install sl) and when you type the command sl into Bash, a text-based steam locomotive will move on the display.” – Don Watkins


Via: opensource.com/article/20/…

By Lujun9972, Opensource.com

This article is originally compiled by LCTT and released in Linux China