F5F Stay Refreshed Software Operating Systems Tell me about your bash aliases!

Tell me about your bash aliases!

Tell me about your bash aliases!

Pages (2): 1 2 Next
T
TheDorii
Junior Member
4
07-10-2025, 05:38 AM
#1
I've started using some custom aliases for my Linux terminal. They really help speed things up and make commands easier to type. Performance mode now shows CPU stats, power saving is enabled, and I’ve adjusted monitor settings with ease. My second monitor is off for better free sync, while the second one is on with DisplayPort. Restarting Xorg is quick with the command I use. Updating packages is a breeze thanks to apt commands. Removing packages is just a single step, and installing updates is straightforward. The current CPU speed is displayed easily, and I’ve edited my bashrc for convenience. Anyone else have handy aliases?
T
TheDorii
07-10-2025, 05:38 AM #1

I've started using some custom aliases for my Linux terminal. They really help speed things up and make commands easier to type. Performance mode now shows CPU stats, power saving is enabled, and I’ve adjusted monitor settings with ease. My second monitor is off for better free sync, while the second one is on with DisplayPort. Restarting Xorg is quick with the command I use. Updating packages is a breeze thanks to apt commands. Removing packages is just a single step, and installing updates is straightforward. The current CPU speed is displayed easily, and I’ve edited my bashrc for convenience. Anyone else have handy aliases?

B
Blazer444
Member
146
07-10-2025, 07:01 AM
#2
It's straightforward, but I've modified my .bashrc file. I rely on Linux as my main system and spend most of my time coding for university and research projects. The only notable feature here is my "dim" command, which lets me adjust monitor brightness beyond standard limits. Typing "dim 0.5" will reduce it to half power, perfect for late-night work.
B
Blazer444
07-10-2025, 07:01 AM #2

It's straightforward, but I've modified my .bashrc file. I rely on Linux as my main system and spend most of my time coding for university and research projects. The only notable feature here is my "dim" command, which lets me adjust monitor brightness beyond standard limits. Typing "dim 0.5" will reduce it to half power, perfect for late-night work.

J
Jem01
Member
80
07-13-2025, 08:11 AM
#3
This command helps organize files and folders based on their size. It works in the terminal and shows you how much space each item occupies.
J
Jem01
07-13-2025, 08:11 AM #3

This command helps organize files and folders based on their size. It works in the terminal and shows you how much space each item occupies.

F
FLPFive
Member
170
07-13-2025, 08:55 AM
#4
In addition to standard commands (such as listing files), here are some less common options: # Determine my public IP alias ipify = "curl https://api64.ipify.org && echo" # Restore terminal appearance reset_terminal_colors = "konsoleprofile colors=Breath" # SSH server1 alias sshsrv1 = "konsoleprofile colors=Gruvbox; ssh srv1; reset_terminal_colors;" # SSH server2 alias sshsrv2 = "konsoleprofile colors=Solarized; ssh srv2; reset_terminal_colors;" Clearly, instead of using srv1 or srv2, I specify the actual server names. Having distinct color schemes for each connection helps avoid unintended commands on the wrong server. *This applies to "Konsole" terminal emulator and also works for "Yakuake". You likely already know this (given your mention of lower limits), just in case someone reads it and tries to adjust brightness via xrandr: it doesn’t influence the backlight at all, so it’s best suited when you lack control over the backlight or when your existing settings aren’t sufficient (like in your situation).*
F
FLPFive
07-13-2025, 08:55 AM #4

In addition to standard commands (such as listing files), here are some less common options: # Determine my public IP alias ipify = "curl https://api64.ipify.org && echo" # Restore terminal appearance reset_terminal_colors = "konsoleprofile colors=Breath" # SSH server1 alias sshsrv1 = "konsoleprofile colors=Gruvbox; ssh srv1; reset_terminal_colors;" # SSH server2 alias sshsrv2 = "konsoleprofile colors=Solarized; ssh srv2; reset_terminal_colors;" Clearly, instead of using srv1 or srv2, I specify the actual server names. Having distinct color schemes for each connection helps avoid unintended commands on the wrong server. *This applies to "Konsole" terminal emulator and also works for "Yakuake". You likely already know this (given your mention of lower limits), just in case someone reads it and tries to adjust brightness via xrandr: it doesn’t influence the backlight at all, so it’s best suited when you lack control over the backlight or when your existing settings aren’t sufficient (like in your situation).*

A
alone_me
Member
180
07-13-2025, 01:12 PM
#5
I possess a highly practical alias or Bash configuration that has caught many eyes, as it works well in my usual environment. This is mainly because I frequently distribute the .bashrc file across several systems I oversee.
A
alone_me
07-13-2025, 01:12 PM #5

I possess a highly practical alias or Bash configuration that has caught many eyes, as it works well in my usual environment. This is mainly because I frequently distribute the .bashrc file across several systems I oversee.

S
seriosh
Member
181
07-14-2025, 06:57 AM
#6
You may want to explore redshift @dcgreen2k. The alias includes fluxgui, which resembles the interface at https://justgetflux.com/. It doesn’t change the purple or grey-purple glow on a black background, but it can significantly reduce blue and aqua illumination. Gamma adjustments tend to keep green light visible unless the temperature drops below 1400 Kelvin (much redder: 1750-1900). Green and blue both suppress melatonin production for up to an hour of exposure. Once exposed to similar lighting for about an hour, blue becomes twice as strong as green. However, there’s no widespread advice against avoiding green light at night. Harvard’s 2014 article (updated later) discusses this topic. To lessen the blue-violet glow, switch your background to dark brown or orange in a virtual terminal. On VT, use: `As root: echo -en "\e]P0200800"` where 0 = black, 1 = red, 2 = green, 3 = unchanged (yellow), 4 = blue, 5 = magenta, 6 = cyan, 7 = white. This lets you adjust text and folder colors. Another method is setting `setterm --background yellow`—it changes the default orange tone to a more neutral shade. You can tweak foreground and background colors or modify all hues via commands like `echo -en "..."`. This approach also works with fullscreen tools such as top.
S
seriosh
07-14-2025, 06:57 AM #6

You may want to explore redshift @dcgreen2k. The alias includes fluxgui, which resembles the interface at https://justgetflux.com/. It doesn’t change the purple or grey-purple glow on a black background, but it can significantly reduce blue and aqua illumination. Gamma adjustments tend to keep green light visible unless the temperature drops below 1400 Kelvin (much redder: 1750-1900). Green and blue both suppress melatonin production for up to an hour of exposure. Once exposed to similar lighting for about an hour, blue becomes twice as strong as green. However, there’s no widespread advice against avoiding green light at night. Harvard’s 2014 article (updated later) discusses this topic. To lessen the blue-violet glow, switch your background to dark brown or orange in a virtual terminal. On VT, use: `As root: echo -en "\e]P0200800"` where 0 = black, 1 = red, 2 = green, 3 = unchanged (yellow), 4 = blue, 5 = magenta, 6 = cyan, 7 = white. This lets you adjust text and folder colors. Another method is setting `setterm --background yellow`—it changes the default orange tone to a more neutral shade. You can tweak foreground and background colors or modify all hues via commands like `echo -en "..."`. This approach also works with fullscreen tools such as top.

D
DoctorOmar
Member
229
07-15-2025, 07:46 PM
#7
Link?
D
DoctorOmar
07-15-2025, 07:46 PM #7

Link?

T
TrentsZeus2002
Junior Member
27
07-16-2025, 04:38 AM
#8
I’ve shared my thoughts on sleep and light in another article:
T
TrentsZeus2002
07-16-2025, 04:38 AM #8

I’ve shared my thoughts on sleep and light in another article:

S
Smurg
Junior Member
13
07-16-2025, 04:49 AM
#9
Do you have any commands you run right before shutdown and again as soon as it starts up? I’m able to use Ctrl+R to search in bash, usually finding what I need after a few attempts with different commands. For the unbound DNS server, here’s an alternative: Also, how can I set this up automatically at shutdown and startup? I’ve added startup commands in the GUI but rely on the command line runlevel at boot. ~/.bashrc alias loadcache='cat unboundfilename.dump | sudo unbound-control load_cache' That’s a startup alias dump='sudo unbound-control dump_cache > unboundfilename.dump'. I also have another (usually I just press the UP arrow and hit enter, password and again, quickly). alias pail='sudo pihole tail' I really enjoy watching DNS requests when connecting a new device, using a wildcard to block everything at first. Then I press Ctrl+C and run sudo pihole blacklist domainname. The main question is, can I shorten “sudo pihole blacklist” to “block”, type the space after an alias of that, and add a domain name? Could I replace it with just “block” followed by the domain?
S
Smurg
07-16-2025, 04:49 AM #9

Do you have any commands you run right before shutdown and again as soon as it starts up? I’m able to use Ctrl+R to search in bash, usually finding what I need after a few attempts with different commands. For the unbound DNS server, here’s an alternative: Also, how can I set this up automatically at shutdown and startup? I’ve added startup commands in the GUI but rely on the command line runlevel at boot. ~/.bashrc alias loadcache='cat unboundfilename.dump | sudo unbound-control load_cache' That’s a startup alias dump='sudo unbound-control dump_cache > unboundfilename.dump'. I also have another (usually I just press the UP arrow and hit enter, password and again, quickly). alias pail='sudo pihole tail' I really enjoy watching DNS requests when connecting a new device, using a wildcard to block everything at first. Then I press Ctrl+C and run sudo pihole blacklist domainname. The main question is, can I shorten “sudo pihole blacklist” to “block”, type the space after an alias of that, and add a domain name? Could I replace it with just “block” followed by the domain?

2
25daniel
Member
177
07-17-2025, 03:14 AM
#10
I've been using f.lux since 2012 and it really helps cut down blue light. My monitors tend to be super bright at night, even when set to the lowest supported level. The dark mode feature has been super useful in easing that problem.
2
25daniel
07-17-2025, 03:14 AM #10

I've been using f.lux since 2012 and it really helps cut down blue light. My monitors tend to be super bright at night, even when set to the lowest supported level. The dark mode feature has been super useful in easing that problem.

Pages (2): 1 2 Next