What's a handy terminal command you use often?

2 years ago by cybercitizen4 to c/asklemmy

papertowels 68 points 2 years ago

sudo !! to rerun last command as sudo.

history can be paired with !5 to run the fifth command listed in history.

path: 0 12486279, hotness: undefined, score: 68, children: 5
kellyaster 5 points 2 years ago

@papertowels@lemmy.one I've been working in the bash shell since 1993 and did not know sudo !! was a thing. Good lord, I no longer have to press up, press crtl-left a bunch of times, then type sudo enter space anymore. And I can give it an easy-to-remember alias like 'resu' or 'redo'! Ahahaha, this changes everything! Thank you!!

path: 0 12486279 12507522, hotness: undefined, score: 5, children: 1
papertowels 2 points 2 years ago

We're all learning tricks in this thread! Grateful for all y'all nerds.

path: 0 12486279 12507522 12508077, hotness: undefined, score: 2, children: 0
communism 5 points 2 years ago

Fifth as in fifth most recent command or fifth oldest?

path: 0 12486279 12486840, hotness: undefined, score: 5, children: 1
papertowels 7 points 2 years ago

I believe it's the fifth oldest - I think !-5 will get you the fifth impost recent, but I was shown that and haven't put it into practice.

The most common usecase I do is something like history | grep docker to find docker commands I've ran, then use ! followed by the number associated with the command I want to run in history.

path: 0 12486279 12486840 12487868, hotness: undefined, score: 7, children: 0
olafurp 1 point 2 years ago

Love these, I used a terminal select from history with fuzzy finding to do the !5 as redo

path: 0 12486279 12504579, hotness: undefined, score: 1, children: 0
LazaroFilm 56 points 2 years ago

cd then ls then cd then ls maybe I’ll throw a ls -a

path: 0 12494442, hotness: undefined, score: 56, children: 5
vrighter 13 points 2 years ago

I use -A instead, which doesn't show "." and ".."

path: 0 12494442 12496584, hotness: undefined, score: 13, children: 0
blackbirdbiryani 9 points 2 years ago

Nah you gotta alias ls -a to la for more efficiency.

path: 0 12494442 12506960, hotness: undefined, score: 9, children: 1
JackbyDev 3 points 2 years ago

l

path: 0 12494442 12506960 12514644, hotness: undefined, score: 3, children: 0
papertowels 2 points 2 years ago

Don't forget your pwd thrown in to get back your bearings!

path: 0 12494442 12508047, hotness: undefined, score: 2, children: 1
JackbyDev 1 point 2 years ago

Done be silly, that's part of my prompt.

path: 0 12494442 12508047 12514654, hotness: undefined, score: 1, children: 0
emb 44 points 2 years ago

I really like that cd command. :P

path: 0 12482898, hotness: undefined, score: 44, children: 11
unknowing8343 19 points 2 years ago

You'll love zoxide then.

path: 0 12482898 12483185, hotness: undefined, score: 19, children: 8
velox_vulnus 0 points 2 years ago
path: 0 12482898 12483185 12483305, hotness: undefined, score: 0, children: 7
Yoddel_Hickory 20 points 2 years ago

The command is 'z'

path: 0 12482898 12483185 12483305 12483897, hotness: undefined, score: 20, children: 4
velox_vulnus 7 points 2 years ago
path: 0 12482898 12483185 12483305 12483897 12484866, hotness: undefined, score: 7, children: 3
jeffreyosborne 3 points 2 years ago

On arch the command is just z

path: 0 12482898 12483185 12483305 12483460, hotness: undefined, score: 3, children: 0
alsimoneau 3 points 2 years ago

When you set it up you tell it which command you want. Default is "cdi" but I changed it to "cd" immediately.

path: 0 12482898 12483185 12483305 12498992, hotness: undefined, score: 3, children: 0
jeena 6 points 2 years ago

Hm I wonder, is it really a command? I thought it is just a function of the shell to change the working directory.

path: 0 12482898 12482971, hotness: undefined, score: 6, children: 1
ClassifiedPancake 8 points 2 years ago

A command is anything you execute in the shell.

cd is just a built-in command

path: 0 12482898 12482971 12485580, hotness: undefined, score: 8, children: 0
LaSirena 42 points 2 years ago

tldr because I am too impatient to read through man pages or google the exact syntax for what I want to do.

path: 0 12492331, hotness: undefined, score: 42, children: 8
pixelscript 26 points 2 years ago

There are exactly three kinds of manpages:

  1. Way too detailed
  2. Not nearly detailed enough
  3. There is no manpage

I will take 1 any day over 2 or 3. Sometimes I even need 1, so I'm grateful for them.

But holy goddamn is it awful when I just want to use a command for aguably its most common use case and the flag or option for that is lost in a crowd of 30 other switches or buried under some modal subcommand. grep helps if you already know the switch, which isn't always.

You could argue commands like this don't have "arguably most common usecases", so manpages should be completely neutral on singling out examples. But I think the existence of tl;dr is the counterargument.

Tangent complaint: I thought the Unix philosophy was "do one thing, and do it well"? Why then do so many of these shell commands have a billion options? Mostly /s but sometimes it's flustering.

path: 0 12492331 12492865, hotness: undefined, score: 26, children: 7
wuphysics87 8 points 2 years ago

tldr is the first of 4 ways I rtfm. Then -h, man, and then the arch wiki

path: 0 12492331 12492865 12494131, hotness: undefined, score: 8, children: 6
vrighter 4 points 2 years ago

i never use man at all. It's just too confusing.

path: 0 12492331 12492865 12494131 12496608, hotness: undefined, score: 4, children: 5
wuphysics87 5 points 2 years ago

I can appreciate that. Appologies if you know this already, but just don't like them. Here are some tips.

It helps a lot to get title/subtitle/flag highlighting. By default man pages are hard to use simply because of how dense they are. It's much easier to skim when you can separate the parts you are looking for up front from the text.

Don't forget '/', 'n', and 'N'. First way to use man pages more effectively is to search them easily. And you can search via regex. Often I'm looking for more info on a particular flag. So I'll press '/' followed by '^ *-g'. For a g flag.

Take notes on the side. It saves you time later. Your future self will thank you. And you learn a lot by skimming them.

Man pages can be intimidating/confusing, but, imho, it's worth training that skill. Even if you are slower up front, it's totally worth it.

path: 0 12492331 12492865 12494131 12496608 12501457, hotness: undefined, score: 5, children: 4
renzev 38 points 2 years ago

tldr is great. Basically a crowd-sourced alternative to man with much more concise entries. Example:

$ tldr dhcpcd

  DHCP client.
  More information: <https://roy.marples.name/projects/dhcpcd>.

  Release all address leases:

      sudo dhcpcd --release

  Request the DHCP server for new leases:

      sudo dhcpcd --rebind
path: 0 12506688, hotness: undefined, score: 38, children: 3
SturgiesYrFase 9 points 2 years ago

Well....slap my ass and call me Mary.....
Thanks kind internet stranger!

path: 0 12506688 12511579, hotness: undefined, score: 9, children: 0
TriflingToad 4 points 2 years ago

:O

path: 0 12506688 12508422, hotness: undefined, score: 4, children: 0
clay_pidgin 3 points 2 years ago

Woah, that's dope as heck. Thank you!

path: 0 12506688 12511756, hotness: undefined, score: 3, children: 0
I_Miss_Daniel 36 points 2 years ago

sudo udevadm monitor

Figuring out which usb device went on holiday.

path: 0 12484008, hotness: undefined, score: 36, children: 1
tetris11 8 points 2 years ago

Wow, super useful command. Starring this comment

path: 0 12484008 12484919, hotness: undefined, score: 8, children: 0
pemptago 36 points 2 years ago

I went a little overboard and wrote a one-liner to accurately answer this question

history|cut -d " " -f 5|sort|uniq -c|sort -nr|head -5

Note: history displays like this for me 20622 2023-02-18 16:41:23 ls I don't know if that's because I set HISTTIMEFORMAT='%F %T ' in .bashrc, or if it's like that for everyone. If it's different for you change -f 5 to target the command. Use -f 5-7 to include flags and arguments.

My top 5 (since last install)

   2002 ls
   1296 cd
    455 hx
    427 g
    316 find

g is an alias for gitui. When I include flags and arguments most of the top commands are aliases, often shortcuts to a project directory.

Not to ramble, but after doing this I figured I should alias the longest, most-used commands (even aliasing ls to l could have saved 2002 keystrokes :P) So I wrote another one-liner to check for available single characters to alias with:

for c in a b c d e f g h i j k l m n o p q r s t u v w x y z; do [[ ! $(command -v $c) ]] && echo $c; done

In .bash_aliases I've added alias b='hx ${HOME}/.bash_aliases' to quickly edit aliases and alias r='source ${HOME}/.bashrc' to reload them.

path: 0 12493102, hotness: undefined, score: 36, children: 7
MigratingtoLemmy 10 points 2 years ago

Helix?

path: 0 12493102 12494143, hotness: undefined, score: 10, children: 3
pemptago 6 points 2 years ago

Yup! Migrated from VSCodium; wanted to learn a modal editor but didn't have the time or confidence to configure vim or neovim. It's been my go-to editor for 2+ years now.

path: 0 12493102 12494143 12495072, hotness: undefined, score: 6, children: 2
MigratingtoLemmy 4 points 2 years ago

I've been using vi (just the basics) for ~4 years, I don't think I could be arsed to pick up the keybindings the other way around lol. I've heard very good things about Helix, of course

path: 0 12493102 12494143 12495072 12495137, hotness: undefined, score: 4, children: 1
HeartyOfGlass 3 points 2 years ago

As another longtime Vi user - I had a hell of a time & wound up switching back lol

I think for a lot of folks Helix would be intuitive. Vi has her hooks in me, though.

path: 0 12493102 12494143 12495072 12495137 12499265, hotness: undefined, score: 3, children: 0
flambonkscious 5 points 2 years ago

Holy shit, you're a madman

path: 0 12493102 12493915, hotness: undefined, score: 5, children: 0
JackbyDev 1 point 2 years ago

history -i

path: 0 12493102 12514671, hotness: undefined, score: 1, children: 0
BaumGeist 1 point 2 years ago
path: 0 12493102 12505411, hotness: undefined, score: 1, children: 0
SinkingLotus 36 points 2 years ago

Sudo !!

It reruns the last command as sudo.

Pretty useful since I'm always forgetting.

path: 0 12492071, hotness: undefined, score: 36, children: 1
squid_slime 3 points 2 years ago

Most commands soon followed by sudo !!

path: 0 12492071 12492972, hotness: undefined, score: 3, children: 0
umbrella 34 points 2 years ago
path: 0 12489626, hotness: undefined, score: 34, children: 1
secret300 1 point 2 years ago

I use this constantly

path: 0 12489626 12498488, hotness: undefined, score: 1, children: 0
zlatiah 31 points 2 years ago

clear because apparently I am too scatterbrained to comprehend more than one full page of text in the terminal

path: 0 12493758, hotness: undefined, score: 31, children: 7
feddylemmy 6 points 2 years ago

I like using CRTL+L to clear. It's nice because you can have a command typed out and still be able to press CTRL+L to clear the screen and keep the command typed out.

path: 0 12493758 12504032, hotness: undefined, score: 6, children: 0
mexicancartel 4 points 2 years ago

I almost never use clear because i'm afraid if i will need the text later.(just like infinity tab number on firefox)

path: 0 12493758 12496059, hotness: undefined, score: 4, children: 5
pupbiru 2 points 2 years ago

* 20

path: 0 12493758 12496059 12501729, hotness: undefined, score: 2, children: 1
zlatiah 1 point 2 years ago

Oh god I also do this... See the comment below, I ran history|cut -d " " -f 5|sort|uniq -c|sort -nr|less on my personal laptop, my third most commonly used command (behind ls and cd) is just typing in nothing...

path: 0 12493758 12496059 12501729 12501916, hotness: undefined, score: 1, children: 0
BaumGeist 1 point 2 years ago
path: 0 12493758 12496059 12505258, hotness: undefined, score: 1, children: 2
mexicancartel 1 point 2 years ago

100 tabs is in mobile. I don't even scroll back to clutter my brain but its there. Tabs are history for me... So I use firefox focus and if there is anything important, i open with firefox.

What script are you reffering to? To log all output? I don't wanna store that but need an assurance that its there till i close terminal window lol

path: 0 12493758 12496059 12505258 12511066, hotness: undefined, score: 1, children: 1
BaumGeist 2 points 2 years ago
path: 0 12493758 12496059 12505258 12511066 12511886, hotness: undefined, score: 2, children: 0
notfromhere 28 points 2 years ago

Since nobody has said yet, I use screen pretty heavily. Want to run a long running task, starting it from your phone? Run screen to create a detachable session then the long running command. You can then safely close out of your terminal or detach with ctrl a, d and continue in your terminal doing something else. screen -r to get back to it.

path: 0 12484043, hotness: undefined, score: 28, children: 15
gitamar 8 points 2 years ago

I recently switched to tmux and boy, it's way better. I basically use only tmux now anymore. Creating panes to have two processes in one glance, multiple windows, awesome. Plus all the benefits of screen.

path: 0 12484043 12489876, hotness: undefined, score: 8, children: 2
krash 3 points 2 years ago

Try zellij. Not as popular as tmux, but very intuitive to use.

path: 0 12484043 12489876 12490584, hotness: undefined, score: 3, children: 0
7dev7random7 1 point 2 years ago

Maybe someone reading wants to now about prefix+s. This doubles your excitement.

path: 0 12484043 12489876 12490331, hotness: undefined, score: 1, children: 0
papertowels 7 points 2 years ago

In a similar vein, nohup lets you send tasks to the background and seems to be everywhere.

path: 0 12484043 12488326, hotness: undefined, score: 7, children: 5
pyr0ball 3 points 2 years ago

You can't mention nohup without at least mentioning kill -9 or pkill to slay the monster you created you madman

path: 0 12484043 12488326 12495459, hotness: undefined, score: 3, children: 4
papertowels 2 points 2 years ago

Sometimes I'll just reboot the entire damn machine just to be safe ;)

path: 0 12484043 12488326 12495459 12495559, hotness: undefined, score: 2, children: 1
Sorse 2 points 2 years ago

shutdown -r now

path: 0 12484043 12488326 12495459 12495559 12496409, hotness: undefined, score: 2, children: 0
olafurp 1 point 2 years ago

Eyyy, don't hate, this is how I start all my work programs. That command is really nice and creates all work programs as children of a single terminal session for easy closing later.

path: 0 12484043 12488326 12495459 12504624, hotness: undefined, score: 1, children: 1
pyr0ball 2 points 2 years ago

No hate! Just need to make sure people know so they don't create a bazillion threads without realizing it, or how to stop them effectively

path: 0 12484043 12488326 12495459 12504624 12506268, hotness: undefined, score: 2, children: 0
tetris11 4 points 2 years ago

Also, screen can connect to an UART device or serial or anything that offers up a TTY

path: 0 12484043 12484889, hotness: undefined, score: 4, children: 0
muzzle 2 points 2 years ago

I Always forget to run screen first, so I just rely heavily on dtach

path: 0 12484043 12487029, hotness: undefined, score: 2, children: 2
7dev7random7 1 point 2 years ago

Simply change your terminal command to execute the terminal multiplexer of your choice.

man terminal_of_choice, look for (start) command.

path: 0 12484043 12487029 12490297, hotness: undefined, score: 1, children: 1
muzzle 1 point 2 years ago

No thanks, I'm good

path: 0 12484043 12487029 12490297 12518229, hotness: undefined, score: 1, children: 0
krash 1 point 2 years ago

How does screen / tmux work when detached from a session, how does it keep the session alive (both when running locally, and while ssh:ing to a server)? Is there a daemon involved?

path: 0 12484043 12490599, hotness: undefined, score: 1, children: 1
darvit 1 point 2 years ago

You can find out by running screen and executing pstree, that way you can see how the screen process is run.

path: 0 12484043 12490599 12493143, hotness: undefined, score: 1, children: 0
Jozav 24 points 2 years ago

pushd and popd to change directory and go back when done there.

path: 0 12483258, hotness: undefined, score: 24, children: 5
jbrains 3 points 2 years ago

Even better when cd automatically invokes pushd.

path: 0 12483258 12483351, hotness: undefined, score: 3, children: 4
lluki 28 points 2 years ago

cd - undoes the last cd. Not quite push/popd but still useful. Pro tip, works also: git checkout -

path: 0 12483258 12483351 12483496, hotness: undefined, score: 28, children: 2
med 4 points 2 years ago

Hell yeah. Every one of these threads makes me more inclined to read man pages

path: 0 12483258 12483351 12483496 12488761, hotness: undefined, score: 4, children: 1
7dev7random7 2 points 2 years ago

You should. These are the actually sources to learn.

path: 0 12483258 12483351 12483496 12488761 12490232, hotness: undefined, score: 2, children: 0
tetris11 2 points 2 years ago

what's your alias?

path: 0 12483258 12483351 12484909, hotness: undefined, score: 2, children: 0
Bougie_Birdie 23 points 2 years ago

Not a specific command, but I learned recently you can just dump any executable script into ~/bin and run it from the terminal.

I suffer greatly from analysis paralysis, I have a very hard time making decisions especially if there's many options. So I wrote a script that reads a text file full of tasks and just picks one. It took me like ten minutes to write and now I spend far more time doing stuff instead of doing nothing and feeling badly that I can't decide what to do.

path: 0 12485504, hotness: undefined, score: 23, children: 3
friend_of_satan 23 points 2 years ago

This is because $HOME/bin is in your $PATH environment variable. You can add more paths that you'd like to execute scripts from, like a personal git repo that contains your scripts.

path: 0 12485504 12485590, hotness: undefined, score: 23, children: 0
unknowing8343 16 points 2 years ago

I think the standard is ~/.local/bin, for the people that like standards.

path: 0 12485504 12487959, hotness: undefined, score: 16, children: 0
potentiallynotfelix 2 points 2 years ago

or add it to path

path: 0 12485504 12494746, hotness: undefined, score: 2, children: 0
LambdaRX 22 points 2 years ago

After using too much WINE, I type pwd, whoami

path: 0 12483177, hotness: undefined, score: 22, children: 0
lud 20 points 2 years ago

As primarily a Windows admin (Yes, we exist on Lemmy ;) ) here are few I use often.

  • Enter-PSSesion
  • Get-ADUser (also group and computer)
  • CLS (aka the superior clear)
  • ii . (short for Invoke-Item . which runs the selected object using the default method. For paths (like .) the default is explorer, so ii . opens the current directory using explorer.)
  • ft (short for Format-Table formats piped input as a table.)
  • fl (short for format-like. Used like ft but for lists.)
  • Where-Object
  • Select-Object
path: 0 12507330, hotness: undefined, score: 20, children: 3
mexicancartel 24 points 2 years ago

path: 0 12507330 12511144, hotness: undefined, score: 24, children: 1
lud 5 points 2 years ago

Fucking hell Lol 😂

path: 0 12507330 12511144 12511804, hotness: undefined, score: 5, children: 0
hactar42 8 points 2 years ago

There are dozens of us.

Also, I'll add:

  • Get-Help
  • Get-Command
  • Get-Member
path: 0 12507330 12508661, hotness: undefined, score: 8, children: 0
sgtnasty 19 points 2 years ago

pv (Pipe Viewer) is a command line tool to view verbose information about data streamed/piped through it. The data can be of any source like files, block devices, network streams etc. It shows the amount of data passed through, time running, progress bar, percentage and the estimated completion time.

path: 0 12486947, hotness: undefined, score: 19, children: 0
Revan343 19 points 2 years ago

Uhhh...sudo su

Don't be like me

path: 0 12493885, hotness: undefined, score: 19, children: 1
vrighter 7 points 2 years ago

sudo -i

path: 0 12493885 12496589, hotness: undefined, score: 7, children: 0
HeartyOfGlass 18 points 2 years ago

clear. Constantly, and for no reason.

path: 0 12484464, hotness: undefined, score: 18, children: 8
igorette 29 points 2 years ago

Ctrl-L

path: 0 12484464 12484717, hotness: undefined, score: 29, children: 5
HeartyOfGlass 24 points 2 years ago

Oh. I know. But you don't understand - I'm compelled to type it out. I must.

path: 0 12484464 12484717 12485141, hotness: undefined, score: 24, children: 1
ripcord 1 point 2 years ago

I used to, but the terminal clear is better, so I don't.

path: 0 12484464 12484717 12485141 12486718, hotness: undefined, score: 1, children: 0
ripcord 2 points 2 years ago

CMD/CTRL-K for me.

path: 0 12484464 12484717 12486712, hotness: undefined, score: 2, children: 2
7dev7random7 1 point 2 years ago

Someone who doesn't know the benefits of dedicated, unlimited scrollback buffers. This command is useful but has a bad effect (when unintentionally).

path: 0 12484464 12484717 12486712 12490359, hotness: undefined, score: 1, children: 1
ripcord 2 points 2 years ago

No, I do. Clearing the scrollback because I want a new, very clear start point for a new activity and don't care about the rest is frequently the goal.

If I do care about the history I'll do something else or possibly been saving history to disk, although that's far more rare.

path: 0 12484464 12484717 12486712 12490359 12494462, hotness: undefined, score: 2, children: 0
pupbiru 1 point 2 years ago

i’d like to introduce you to your new best friend: reset… it doesn’t everything clear does and a LOT more

path: 0 12484464 12497101, hotness: undefined, score: 1, children: 0
omxxi 1 point 2 years ago

haha, I can relate to that :). formerly I had the compulsion to execute sync frequently. Now my compulsion is to push Ctrl-C like 4 times every time I need it. I read somewhere that's common because of ^C has a lack of feedback to the user, so, a script showing an alert that the clipboard received some information helped with this compulsion.

path: 0 12484464 12517639, hotness: undefined, score: 1, children: 0
some_guy 17 points 2 years ago

cd every single day.

path: 0 12492162, hotness: undefined, score: 17, children: 1
InternetCitizen2 5 points 2 years ago

You haven't discovered exa? Noob

/s

path: 0 12492162 12493005, hotness: undefined, score: 5, children: 0
Appoxo 16 points 2 years ago

ls and cd

path: 0 12499045, hotness: undefined, score: 16, children: 2
AdNecrias 4 points 2 years ago

I sometimes hit ls and then need to type dir.

path: 0 12499045 12504954, hotness: undefined, score: 4, children: 1
Appoxo 5 points 2 years ago

The amount of times i tried to dir in linux and ls in windows is mire than I like to admit

path: 0 12499045 12504954 12507103, hotness: undefined, score: 5, children: 0
RagingRobot 15 points 2 years ago

CTR + u will delete the whole command. I use that a lot so I don't have to backspace. It's saved me a ton of time

path: 0 12488533, hotness: undefined, score: 15, children: 5
call_me_xale 16 points 2 years ago

Related: Alt + ., to cycle through arguments used in previous commands

path: 0 12488533 12489447, hotness: undefined, score: 16, children: 0
potentiallynotfelix 5 points 2 years ago

I just use control C, is there a difference other than whether the line shows up or not?

path: 0 12488533 12494739, hotness: undefined, score: 5, children: 0
darvit 4 points 2 years ago

How about ctrl+c to cancel and clear the command you are typing? It's much easier because you only need 1 hand, and does not impact your shell's history.

path: 0 12488533 12493093, hotness: undefined, score: 4, children: 0
emergencybird 2 points 2 years ago

This is great for when you type in your root password incorrectly!

path: 0 12488533 12493317, hotness: undefined, score: 2, children: 0
anindefinitearticle 2 points 2 years ago
path: 0 12488533 12495300, hotness: undefined, score: 2, children: 0
lluki 13 points 2 years ago

xdg-open FILE - opens a file with the default GUI app. I use it for example to open PDFs and PNG. I have a one letter alias for that. It can also open a file explorer in the current directory xdg-open . . Should work on any compliant desktop environment (gnome/kde).

path: 0 12497196, hotness: undefined, score: 13, children: 0
Shimon 12 points 2 years ago
sl
path: 0 12491051, hotness: undefined, score: 12, children: 2
nailbar 4 points 2 years ago

Choo choo!

path: 0 12491051 12496528, hotness: undefined, score: 4, children: 0
berryjam 2 points 2 years ago

A lemming of taste

path: 0 12491051 12495308, hotness: undefined, score: 2, children: 0
ripcord 12 points 2 years ago

ls

path: 0 12486681, hotness: undefined, score: 12, children: 1
ace_garp 3 points 2 years ago

ls -ltrc

Show most recently modified files.

path: 0 12486681 12493036, hotness: undefined, score: 3, children: 0
majestictechie 9 points 2 years ago

On my desktop: df -h to check disk usage htop to see resource usage ll list directory contents

path: 0 12482810, hotness: undefined, score: 9, children: 2
Albbi 10 points 2 years ago

I recently found btop and am trying to use that instead of htop.

path: 0 12482810 12483678, hotness: undefined, score: 10, children: 1
majestictechie 8 points 2 years ago

looks up btop ooooo

path: 0 12482810 12483678 12483950, hotness: undefined, score: 8, children: 0
beirdobaggins 9 points 2 years ago

diff -y -W 200 file1 file2

Shows a side by side diff of 2 files with enough column width to see most of what I need usually.

I have actually aliased this command as diffy

ctrl-r

searching bash history

du -sh * | sort -h

shows size of all files and dirs in the current dir and sorts them in ascending order so you can easily see the largest files or dirt ant the end of the list

ls -ltr

Shows the most recently modified files at the end of the listing.

path: 0 12499211, hotness: undefined, score: 9, children: 0
blackstrat 9 points 2 years ago

ll

df -h

du -sch

Ctrl+r

path: 0 12483018, hotness: undefined, score: 9, children: 3
notfromhere 3 points 2 years ago

ll

Is an alias for

ls -al

yea?

path: 0 12483018 12483980, hotness: undefined, score: 3, children: 2
subtext 2 points 2 years ago

I set mine to

ls -lAh
path: 0 12483018 12483980 12495794, hotness: undefined, score: 2, children: 0
blackstrat 1 point 2 years ago

I have it as ls -alFh

path: 0 12483018 12483980 12563769, hotness: undefined, score: 1, children: 0
technocat 9 points 2 years ago
  • man
  • fd
  • entr
  • rg
  • gitui
  • nvim
  • tee
  • cd
  • mv
  • rm
  • ls
  • tmux
  • btop
  • yazi
  • du
  • xargs
  • cat
  • less
path: 0 12483040, hotness: undefined, score: 9, children: 0
hit_the_rails 9 points 2 years ago

sudo pacman -Syu

path: 0 12485431, hotness: undefined, score: 9, children: 6
sneezycat 3 points 2 years ago

I just aliased "sudo pacman -Syu && yay -Syu --aur" to "update" cause I got tired of writing it every day.

path: 0 12485431 12487136, hotness: undefined, score: 3, children: 5
MinFapper 14 points 2 years ago

You can just run yay with no arguments and it does exactly what your update script does.

path: 0 12485431 12487136 12488010, hotness: undefined, score: 14, children: 1
sneezycat 3 points 2 years ago

Huh, the more you know.

path: 0 12485431 12487136 12488010 12488438, hotness: undefined, score: 3, children: 0
Noxious 1 point 2 years ago

Wouldn't it make more sense to just yay -Syu to update everything, normal packages and AUR packages?

path: 0 12485431 12487136 12511385, hotness: undefined, score: 1, children: 2
sneezycat 1 point 2 years ago

The reason I did it like this is because:

  • I didn't know yay could invoke pacman
  • I didn't want yay "upgrading" my pacman packages with AUR packages.

But I was just misunderstanding yay. As another comment said before you, one can just run yay without any arguments and it accomplishes the same thing.

path: 0 12485431 12487136 12511385 12513608, hotness: undefined, score: 1, children: 1
Noxious 2 points 2 years ago

Yay doesn't replace normal packages with AUR packages. Btw It's not just an AUR helper, it's a wrapper for Pacman with AUR support built-in. Check out paru btw, it's a more modern version of yay that basically works the same way: https://github.com/Morganamilo/paru

path: 0 12485431 12487136 12511385 12513608 12515492, hotness: undefined, score: 2, children: 0
kittenzrulz123 9 points 2 years ago

Btop is an amazing resource monitor

path: 0 12493782, hotness: undefined, score: 9, children: 2
daq 1 point 2 years ago

Have you tried glances?

path: 0 12493782 12493918, hotness: undefined, score: 1, children: 1
kittenzrulz123 1 point 2 years ago

Never heard of it, looks cool but not as pretty as btop. Also has a ton of information I don't personally care about so for me it doesn't seem great.

path: 0 12493782 12493918 12494754, hotness: undefined, score: 1, children: 0
nichtburningturtle 8 points 2 years ago

nmtui. But that's because my router is trash.

path: 0 12482781, hotness: undefined, score: 8, children: 0
NaevaTheRat 8 points 2 years ago path: 0 12490864, hotness: undefined, score: 8, children: 1
Andromxda 1 point 2 years ago

Is there something similar in fish shell?

path: 0 12490864 12491873, hotness: undefined, score: 1, children: 0
_thebrain_ 8 points 2 years ago

Not a command as much as I press the up arrow a lot. I'm.pretty lazy and hitting the up arrow 12 times is easier then retyping a complex rsync command.

path: 0 12484272, hotness: undefined, score: 8, children: 7
waggz 13 points 2 years ago

you ever use ctrl+r ?

path: 0 12484272 12484628, hotness: undefined, score: 13, children: 3
hit_the_rails 7 points 2 years ago

...I do now!

path: 0 12484272 12484628 12485393, hotness: undefined, score: 7, children: 2
naught 7 points 2 years ago path: 0 12484272 12484628 12485393 12486581, hotness: undefined, score: 7, children: 1
hit_the_rails 2 points 2 years ago

Thanks friend, will do!

path: 0 12484272 12484628 12485393 12486581 12495385, hotness: undefined, score: 2, children: 0
Nath 4 points 2 years ago

If you know it was the most recent rsync command: just type !rsync.

path: 0 12484272 12488866, hotness: undefined, score: 4, children: 0
Sorse 1 point 2 years ago

Laughs in fish

path: 0 12484272 12496553, hotness: undefined, score: 1, children: 1
_thebrain_ 2 points 2 years ago

I actually use fish on my personal machine. But the servers I manage are pretty basic to save space and all just use stock bash.

path: 0 12484272 12496553 12499940, hotness: undefined, score: 2, children: 0
pocopene 8 points 2 years ago

ncdu

path: 0 12492708, hotness: undefined, score: 8, children: 0
anonymouse2 8 points 2 years ago

I recently learned to use a for loop on the command line to organize hundreds of files in a few seconds.

path: 0 12483236, hotness: undefined, score: 8, children: 7
makingStuffForFun 1 point 2 years ago

Example of said Black Magik?

path: 0 12483236 12483293, hotness: undefined, score: 1, children: 6
anonymouse2 9 points 2 years ago

Let's say, for example, you have a directory of files named x01-001; x01-002; x02-001; x02-002; x03-001... and so on.

I want to create subdirectories for each 'x' iteration and move each set to the corresponding subdirectory. My loop would look like this:

for i in {1..3}; do mkdir Data_x0$i && mv x0$i* Data_x0$i; done

I've also been using it if I need to rename large batches of files quickly.

path: 0 12483236 12483293 12483996, hotness: undefined, score: 9, children: 5
friend_of_satan 9 points 2 years ago

Check out rename

$ touch foo{1..5}.txt
$ rename -v 's/foo/bar/' foo*
foo1.txt renamed as bar1.txt
foo2.txt renamed as bar2.txt
foo3.txt renamed as bar3.txt
foo4.txt renamed as bar4.txt
foo5.txt renamed as bar5.txt
$ rename -v 's/\.txt/.text/' *.txt
bar1.txt renamed as bar1.text
bar2.txt renamed as bar2.text
bar3.txt renamed as bar3.text
bar4.txt renamed as bar4.text
bar5.txt renamed as bar5.text
$ rename -v 's/(.*)\.text/1234-$1.txt/' *.text
bar1.text renamed as 1234-bar1.txt
bar2.text renamed as 1234-bar2.txt
bar3.text renamed as 1234-bar3.txt
bar4.text renamed as 1234-bar4.txt
bar5.text renamed as 1234-bar5.txt
path: 0 12483236 12483293 12483996 12485506, hotness: undefined, score: 9, children: 3
0_0j 1 point 2 years ago

SED combinator, you win 🙌

path: 0 12483236 12483293 12483996 12485506 12487436, hotness: undefined, score: 1, children: 0
electric_nan 1 point 2 years ago

In your second example, it looks like you have an escape character before the first 'dot', but not the second one. Is this a typo, or am I misunderstanding the command?

path: 0 12483236 12483293 12483996 12485506 12496703, hotness: undefined, score: 1, children: 1
tetris11 4 points 2 years ago

xargs is also fun, and assuming your for loop doesn't update anything out of the loop, is highly parallelizable

The equivalent of the same command, that handles 10 tasks concurrently, using %% as a variable placeholder.

seq 1 100 | xargs -I'%%' -P 10 sh -c 'mkdir Data_X0%% && mv x0%%* Data_X0%%;'

But for mass renaming files, dired along with rectangle-select and multicursors within Emacs is my goto.

path: 0 12483236 12483293 12483996 12485007, hotness: undefined, score: 4, children: 0
Wuttin 7 points 2 years ago

jq

path: 0 12486350, hotness: undefined, score: 7, children: 0
pineapplelover 7 points 2 years ago

Neofetch

path: 0 12494653, hotness: undefined, score: 7, children: 2
potentiallynotfelix 9 points 2 years ago

let me guess, you either use arch or gentoo

path: 0 12494653 12494734, hotness: undefined, score: 9, children: 1
pineapplelover 4 points 2 years ago

You caught me. (I use arch btw)

path: 0 12494653 12494734 12507488, hotness: undefined, score: 4, children: 0
NauticalNoodle 7 points 2 years ago

For Debian based/descended distros:

sudo apt-get update && sudo apt-get upgrade

And technically I also regularly use

redshift -O 3000

all of the blue light filter programs try to align themselves with a user's geographic location and time, but I don't keep normal hours

path: 0 12504325, hotness: undefined, score: 7, children: 3
sirico 8 points 2 years ago

Chuck the -y in there for extra lazy mode

path: 0 12504325 12504522, hotness: undefined, score: 8, children: 1
NauticalNoodle 6 points 2 years ago

I would but much like somebody else's recent post I have in the past nuked my install by blindly agreeing to some recommended software removals before. These days I like to double check what packages are being updated and replaced.

path: 0 12504325 12504522 12504627, hotness: undefined, score: 6, children: 0
igorette 2 points 2 years ago

topgrade does this and and a lot more

path: 0 12504325 12509758, hotness: undefined, score: 2, children: 0
JoMiran 7 points 2 years ago

sudo

path: 0 12483300, hotness: undefined, score: 7, children: 3
LambdaRX 12 points 2 years ago

Make me a sandwich.

path: 0 12483300 12483374, hotness: undefined, score: 12, children: 2
nichtburningturtle 15 points 2 years ago

LambdaRX is not in the sudoers file. This incident will be reported

path: 0 12483300 12483374 12484093, hotness: undefined, score: 15, children: 1
LambdaRX 5 points 2 years ago

Eh, guess I won't get anything for christmas.

path: 0 12483300 12483374 12484093 12484728, hotness: undefined, score: 5, children: 0
unionagainstdhmo 6 points 2 years ago
path: 0 12509867, hotness: undefined, score: 6, children: 0
olafurp 6 points 2 years ago

g-push which is alias for

git push origin `git branch --show`

Which I'm writing on my phone without testing or looking

path: 0 12504556, hotness: undefined, score: 6, children: 4
JackbyDev 2 points 2 years ago

git config --global alias.pusho 'push --set-upstream origin HEAD'

You're welcome.

path: 0 12504556 12514551, hotness: undefined, score: 2, children: 2
olafurp 1 point 2 years ago

So that's making git push always push to the current branch?

path: 0 12504556 12514551 12517967, hotness: undefined, score: 1, children: 1
JackbyDev 1 point 2 years ago

When you're pushing a new branch you've never pushed before you need the -u command. That's what this alias is for.

As long as the config's push.default isn't matching, git push without arguments will only push the current branch.

path: 0 12504556 12514551 12517967 12519960, hotness: undefined, score: 1, children: 0
Cruxil 2 points 2 years ago

git push origin HEAD is a slightly shorter way of doing the same thing, even though you have an alias anyway lol

path: 0 12504556 12508695, hotness: undefined, score: 2, children: 0
Spider89 6 points 2 years ago

nano

path: 0 12493172, hotness: undefined, score: 6, children: 2
black0ut 5 points 2 years ago

The one downvote is from the Vim user

path: 0 12493172 12498641, hotness: undefined, score: 5, children: 0
black0ut -1 points 2 years ago

The one downvote is from the Vim user

path: 0 12493172 12498642, hotness: undefined, score: -1, children: 0
nameisnotimportant 6 points 2 years ago

I use atuin (link) all the time

path: 0 12514175, hotness: undefined, score: 6, children: 1
seth 0 points 2 years ago
path: 0 12514175 12518022, hotness: undefined, score: 0, children: 0
DirigibleProtein 6 points 2 years ago

ls -al

path: 0 12482722, hotness: undefined, score: 6, children: 14
walden 6 points 2 years ago

I learned you can edit .bashrc (in your home dir) and update the alias for ls to include what I like. It has saved me lots of keystrokes. Mine is ls -lha in addition to whatever color coding stuff is there by default.

path: 0 12482722 12483211, hotness: undefined, score: 6, children: 12
jbrains 7 points 2 years ago

You might like eza even more!

path: 0 12482722 12483211 12483360, hotness: undefined, score: 7, children: 10
Noxious 2 points 2 years ago

You might like lsd even more than that!

path: 0 12482722 12483211 12483360 12511392, hotness: undefined, score: 2, children: 0
walden 2 points 2 years ago

Hmm, that's not working for me. You mean use those as options? 'ls -eza'?

path: 0 12482722 12483211 12483360 12483481, hotness: undefined, score: 2, children: 8
babeuh 4 points 2 years ago path: 0 12482722 12483211 12483360 12483481 12483520, hotness: undefined, score: 4, children: 2
jbrains 3 points 2 years ago

No, eza is one of those modern Rust replacement programs. It replaces ls.

path: 0 12482722 12483211 12483360 12483481 12484911, hotness: undefined, score: 3, children: 4
4am 2 points 2 years ago

A lot of distros include a .bashrc with common ls aliases commented out, just waiting for you to activate them if you like.

path: 0 12482722 12483211 12483696, hotness: undefined, score: 2, children: 0
avguser 3 points 2 years ago

Another ls alias I'm a fan of is ls -latr which I alias to lt. It gives you a time sorted directory listing with the most recent next to your cursor (helpful for large directories).

path: 0 12482722 12484143, hotness: undefined, score: 3, children: 0
Cruxil 6 points 2 years ago path: 0 12508716, hotness: undefined, score: 6, children: 0
korthrun 6 points 2 years ago path: 0 12491883, hotness: undefined, score: 6, children: 1
x00za 5 points 2 years ago
path: 0 12491883 12493876, hotness: undefined, score: 5, children: 0
seth 5 points 2 years ago
path: 0 12504211, hotness: undefined, score: 5, children: 6
worsedoughnut 5 points 2 years ago

I have cd && clear aliased as home

Lazy aliases unite!

path: 0 12504211 12507071, hotness: undefined, score: 5, children: 0
BaumGeist 2 points 2 years ago
path: 0 12504211 12504521, hotness: undefined, score: 2, children: 3
theshatterstone54 1 point 2 years ago path: 0 12504211 12504521 12526952, hotness: undefined, score: 1, children: 2
BaumGeist 1 point 2 years ago
path: 0 12504211 12504521 12526952 12545865, hotness: undefined, score: 1, children: 1
theshatterstone54 1 point 2 years ago

How slow, because I neved noticed

Trust me, it's noticeable. Or at least it was for me. Numbers wise, it doesn't sound like much, but the difference between 0.05s and 0.5s (which are roughly the times I was experiencing) is very noticeable, at least for me. One is done before you've even fully lifted the finger off the key, while with the other you're preparing to press (or maybe you're already pressing pressing) the next key, by the time you see a reaction.

Your mileage may vary.

path: 0 12504211 12504521 12526952 12545865 12546160, hotness: undefined, score: 1, children: 0
JackbyDev 2 points 2 years ago

exec $SHELL -l

path: 0 12504211 12514562, hotness: undefined, score: 2, children: 0
alsimoneau 5 points 2 years ago

I do love fuck.

path: 0 12499043, hotness: undefined, score: 5, children: 1
mexicancartel 1 point 2 years ago

And you mistype it as fsck

path: 0 12499043 12511318, hotness: undefined, score: 1, children: 0
kionite231 5 points 2 years ago
history | fzf
path: 0 12484320, hotness: undefined, score: 5, children: 3
gitamar 3 points 2 years ago

Awesome, didn't know fzf yet

path: 0 12484320 12489920, hotness: undefined, score: 3, children: 0
krash 2 points 2 years ago

Fzf is so useful its ridiculous. I recreated the functionality of sshs with fzf and a small bash script.

path: 0 12484320 12490635, hotness: undefined, score: 2, children: 0
korthrun 1 point 2 years ago

Check out the fzf docs. It ships with helpers that offer better shell integration than you're getting here.

path: 0 12484320 12491823, hotness: undefined, score: 1, children: 0
sp451 5 points 2 years ago

sudo rm -rf /

Very powerful yet helpful command :-)

path: 0 12483269, hotness: undefined, score: 5, children: 7
makingStuffForFun 17 points 2 years ago

Someone has to say this. Don't do it anyone

path: 0 12483269 12483286, hotness: undefined, score: 17, children: 4
sp451 13 points 2 years ago

Agree. Don’t just copy and paste CLI commands you find on the internet, suggested by a stranger

path: 0 12483269 12483286 12483310, hotness: undefined, score: 13, children: 0
Diplomjodler3 7 points 2 years ago

Instructions unclear, dick now stuck in computer.

path: 0 12483269 12483286 12483462, hotness: undefined, score: 7, children: 1
JetpackJackson 2 points 2 years ago

Lp0 on fire

path: 0 12483269 12483286 12483462 12487776, hotness: undefined, score: 2, children: 0
Hux 4 points 2 years ago

For reference: https://en.m.wikipedia.org/wiki/Rm_(Unix)

The rm -rf / variant of the command, if run by a superuser, would cause every file accessible from the present file system to be deleted from the machine.

path: 0 12483269 12483286 12484420, hotness: undefined, score: 4, children: 0
papertowels 9 points 2 years ago

The most deceptive joke I've seen on this is sudo rm -fr / to remove the French language pack

path: 0 12483269 12486218, hotness: undefined, score: 9, children: 0
potentiallynotfelix 7 points 2 years ago

I did this on my personal computer just to prove a point.

path: 0 12483269 12494769, hotness: undefined, score: 7, children: 0
toastal 5 points 2 years ago

GNU Parallel

path: 0 12496297, hotness: undefined, score: 5, children: 0
macattack 5 points 2 years ago

Getting cheatsheets via curl cheat.sh/INSERT_COMMAND_HERE

No install necessary, Also, you can quickly search within the cheatsheets via ~. For example if you copy curl cheat.sh/ls~find will show all the examples of ls that use find. If you remove ~find, then it shows all examples of ls.

I have a function in my bash alias for it (also piped into more for readability):

function cht() { curl cheat.sh/"$1"?style=igor|more }

path: 0 12486829, hotness: undefined, score: 5, children: 0
squid_slime 5 points 2 years ago

du -sh /too/bar to get size of files/folders. sudo !! inserts sudo into previous command when forgotten. yay for full system update if yay is installed. cat reads files.

path: 0 12493052, hotness: undefined, score: 5, children: 0
MadBob 5 points 2 years ago

I use "ping" every time I suspect my internet might be going a bit slow.

path: 0 12498814, hotness: undefined, score: 5, children: 3
LordCrom 1 point 2 years ago

Try mtr . It'll run kinda like a trace route but will show you where the delay is happening. Still relys in icmp not being blocked

path: 0 12498814 12508597, hotness: undefined, score: 1, children: 2
MadBob 1 point 2 years ago

'mtr' is not recognized as an internal or external command, operable program or batch file.

I assume I'm on the wrong OS.

path: 0 12498814 12508597 12531631, hotness: undefined, score: 1, children: 1
LordCrom 1 point 2 years ago

Linux tool. I use it on Ubuntu hosts

path: 0 12498814 12508597 12531631 12561567, hotness: undefined, score: 1, children: 0
pyr0ball 4 points 2 years ago

Going to shamelessly plug my custom bashrc setup which has a ton of little scripting helpers and a few useful aliases. Remember to clone recursively if you want to try it out. (Still very much a work in progress, but it's getting to be pretty robust)

https://GitHub.com/pyr0ball/PRbL-bashrc.git

path: 0 12495512, hotness: undefined, score: 4, children: 0
CameronDev 4 points 2 years ago

touch 😏

path: 0 12483217, hotness: undefined, score: 4, children: 1
sem 6 points 2 years ago

I remember touch

path: 0 12483217 12484501, hotness: undefined, score: 6, children: 0
drmoose 4 points 2 years ago

I really like how nushell can parse output into it's native structures called tables using the detect command.

Unlike string outputs, tables allow for easy data manipulation through pipes like select foo will select foo key and you can filter and even reshape the datasets.

This is great if you need to work with large data pipes like kuberneters so you can do something like:

kubectl get pods --all-namespaces | detect columns | where $it.STATUS !~ "Running|Completed" | par-each { |it| kubectl -n $it.NAMESPACE delete pod $it.NAME }

This looks complex but it parses kubectl table string to table object -> filters rows only where status is not running or completed -> executes pod delete task for each row in parallel.

Nushell take a while to learn but having real data objects in your terminal pipes is incredible! Especially with the detect command.

There's are few more shells that do that though nu is the most mature one I've seen so far.

path: 0 12514301, hotness: undefined, score: 4, children: 0
z3rOR0ne 4 points 2 years ago

locate, from the mlocate package. So useful. Honorable mention goes out to tldr.

path: 0 12484621, hotness: undefined, score: 4, children: 0
plumcreek 4 points 2 years ago

qmv -f do ${dir}

... for quickly moving and renaming files. The default 'qmv' opens up your preferred text editor with a list of the source and destination name of the directory of files you want to move/rename. The '-f do' tells the command we only want to see/edit the [d]estination [o]nly. If you need to rename/move a bunch of files, it's much quicker to do it in vim (at least for me).

path: 0 12492840, hotness: undefined, score: 4, children: 1
drcouzelis 1 point 2 years ago

It sounds similar to one of my favorite commands! vidir 🙂

path: 0 12492840 12492926, hotness: undefined, score: 1, children: 0
this 3 points 2 years ago

not sure if it counts as a command, but i use the up arrow to scroll through previous commands like, almost every time I open a terminal.

path: 0 12484855, hotness: undefined, score: 3, children: 1
tetris11 5 points 2 years ago

Ctrl-R: (type something)

path: 0 12484855 12484895, hotness: undefined, score: 5, children: 0
friend_of_satan 3 points 2 years ago
path: 0 12485598, hotness: undefined, score: 3, children: 0
electric_nan 3 points 2 years ago

Saving this thread for later, but I use rsync -a a lot.

path: 0 12496731, hotness: undefined, score: 3, children: 2
blackbirdbiryani 2 points 2 years ago

Have you heard of our lord and saviour rclone?

I haven't gone back to rsync in a long time.

path: 0 12496731 12506976, hotness: undefined, score: 2, children: 1
electric_nan 1 point 2 years ago

I use it to mount cloud storage as network drives... I'll have to look into your implication though!

path: 0 12496731 12506976 12507887, hotness: undefined, score: 1, children: 0
SorteKanin 3 points 2 years ago

Zoxide, dust, fd, rg, btm, tokei. So many newer Rust tools that are way better than the old stuff.

path: 0 12514660, hotness: undefined, score: 3, children: 0
unionagainstdhmo 3 points 2 years ago
path: 0 12509866, hotness: undefined, score: 3, children: 1
jbk 2 points 2 years ago

Control + D

path: 0 12509866 12513791, hotness: undefined, score: 2, children: 0
ColdWater 3 points 2 years ago

sudo

path: 0 12514892, hotness: undefined, score: 3, children: 1
kaidenshi 2 points 2 years ago

doas

path: 0 12514892 12519466, hotness: undefined, score: 2, children: 0
jbrains 3 points 2 years ago

ranger

path: 0 12483361, hotness: undefined, score: 3, children: 1
tetris11 3 points 2 years ago

If you change the colours to night mode, the song "Sister Christian" starts playing

path: 0 12483361 12485032, hotness: undefined, score: 3, children: 0
1984 2 points 2 years ago path: 0 12485495, hotness: undefined, score: 2, children: 1
eric 2 points 2 years ago

I trigger it with the up arrow.

path: 0 12485495 12486649, hotness: undefined, score: 2, children: 0
kang 2 points 2 years ago

$ z

A great cd alternative

Also $ sudo paru -Syu

path: 0 12506389, hotness: undefined, score: 2, children: 2
theshatterstone54 3 points 2 years ago

I think you can run paru without sudo and it should still do privilege escalation no problem

path: 0 12506389 12526903, hotness: undefined, score: 3, children: 1
kang 1 point 2 years ago

oh yes, i was thinking about pacman when writing haha

path: 0 12506389 12526903 12619017, hotness: undefined, score: 1, children: 0
FrostyCaveman 2 points 2 years ago path: 0 12485409, hotness: undefined, score: 2, children: 0
potentiallynotfelix 2 points 2 years ago

less, watch

path: 0 12486696, hotness: undefined, score: 2, children: 0
LEVI 2 points 2 years ago
path: 0 12483461, hotness: undefined, score: 2, children: 0
ICastFist 2 points 2 years ago

More of a shortcut, CTRL + A + D to exit the current session (exits a sudo su first, then a ssh, then the actual terminal)

path: 0 12499008, hotness: undefined, score: 2, children: 4
BaumGeist 1 point 2 years ago
path: 0 12499008 12504545, hotness: undefined, score: 1, children: 3
ICastFist 1 point 2 years ago

One "exit" per press

path: 0 12499008 12504545 12533197, hotness: undefined, score: 1, children: 2
BaumGeist 1 point 2 years ago
path: 0 12499008 12504545 12533197 12545580, hotness: undefined, score: 1, children: 1
ICastFist 1 point 2 years ago

Really? Then I must've been taught wrong and never noticed

path: 0 12499008 12504545 12533197 12545580 12555768, hotness: undefined, score: 1, children: 0
berryjam 2 points 2 years ago

qalc

path: 0 12495323, hotness: undefined, score: 2, children: 0
Hackerman_uwu 2 points 2 years ago

rsync

I use it to backup important work to an external drive.

path: 0 12513960, hotness: undefined, score: 2, children: 0
spittingimage 2 points 2 years ago

I often play an old DOS game in DOSBox, and when I exit it doesn't reset the screen resolution. So I reset it manually by typing

xrandr -output e-DP1 -auto

path: 0 12507456, hotness: undefined, score: 2, children: 0
BigLime 2 points 2 years ago

Neofetch

path: 0 12485257, hotness: undefined, score: 2, children: 1
sneezycat 7 points 2 years ago

Get on with the times, install fastfetch ;)

path: 0 12485257 12487193, hotness: undefined, score: 7, children: 0
InSamsara 1 point 2 years ago

Neofetch

I just think it's neat.

path: 0 12514089, hotness: undefined, score: 1, children: 2
theshatterstone54 1 point 2 years ago

It's been abandoned btw. People recommend to switch to alternatives. Fastfetch and hyfetch seem to be the best ones rn.

Though I can't confirm as I wrote my own minimal fetch

path: 0 12514089 12526882, hotness: undefined, score: 1, children: 1
InSamsara 1 point 2 years ago

Works just fine for me

path: 0 12514089 12526882 12530106, hotness: undefined, score: 1, children: 0
krash 1 point 2 years ago
path: 0 12490656, hotness: undefined, score: 1, children: 0
smackjack 1 point 2 years ago
path: 0 12499097, hotness: undefined, score: 1, children: 0
daggermoon 1 point 2 years ago
flac -t *
path: 0 12513660, hotness: undefined, score: 1, children: 0
JackbyDev 1 point 2 years ago

git

path: 0 12514501, hotness: undefined, score: 1, children: 0
10_0 1 point 2 years ago
path: 0 12485603, hotness: undefined, score: 1, children: 0
MapleEngineer -1 points 2 years ago

[2J[H

Is one of my favorites. Of course, most of you are too young to know what that means.

path: 0 12507247, hotness: undefined, score: -1, children: 2
JackbyDev 3 points 2 years ago

Is that easier than typing clear? Also, not sure why you'd say something like that about people's age. Anyone using terminals today is often going to run into weird quirks of them being around for decades even if they're young.

path: 0 12507247 12514638, hotness: undefined, score: 3, children: 1
MapleEngineer 0 points 2 years ago

In the days before *nx, "terminal" meant a VT terminal and "clear" wasn't a thing.

path: 0 12507247 12514638 12515624, hotness: undefined, score: 0, children: 0
asklemmy
asklemmy

@lemmy.ml

login for more options
55789
8842
4310

A loosely moderated place to ask open-ended questions

Search asklemmy �*

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

Icon by @Double_A@discuss.tchncs.de

go to feed...