this post was submitted on 21 Sep 2024
204 points (96.8% liked)

Asklemmy

43419 readers
1303 users here now

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_[email protected]~

founded 5 years ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 4 points 4 hours ago
[โ€“] [email protected] 23 points 9 hours ago (3 children)

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
[โ€“] [email protected] 4 points 1 hour ago

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

[โ€“] [email protected] 2 points 1 hour ago

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

[โ€“] [email protected] 4 points 6 hours ago

I've recently started using tmux when starting a new SSH session to try to build the habit.

https://github.com/tmux/tmux/wiki

[โ€“] [email protected] 12 points 8 hours ago* (last edited 8 hours ago) (2 children)

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
[โ€“] [email protected] 9 points 2 hours ago (1 children)
[โ€“] [email protected] 3 points 1 hour ago

Fucking hell Lol ๐Ÿ˜‚

[โ€“] [email protected] 6 points 6 hours ago

There are dozens of us.

Also, I'll add:

  • Get-Help
  • Get-Command
  • Get-Member
[โ€“] [email protected] 1 points 4 hours ago
[โ€“] [email protected] 2 points 8 hours ago* (last edited 8 hours 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

[โ€“] [email protected] 6 points 12 hours ago (1 children)

g-push which is alias for

git push origin `git branch --show`

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

[โ€“] [email protected] 2 points 6 hours ago

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

[โ€“] [email protected] 6 points 12 hours ago* (last edited 12 hours ago) (2 children)

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

[โ€“] [email protected] 2 points 4 hours ago

topgrade does this and and a lot more

[โ€“] [email protected] 7 points 12 hours ago (1 children)

Chuck the -y in there for extra lazy mode

[โ€“] [email protected] 6 points 12 hours 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.

[โ€“] [email protected] 2 points 9 hours ago

$ z

A great cd alternative

Also $ sudo paru -Syu

[โ€“] [email protected] 1 points 8 hours ago* (last edited 8 hours ago)

[2J[H

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

[โ€“] [email protected] 5 points 12 hours ago (2 children)

In my ~/.bashprofile: alias resource="source ~/.bashprofile"

In my terminal: resource

Anything to save a few characters

[โ€“] [email protected] 5 points 8 hours ago

I have cd && clear aliased as home

Lazy aliases unite!

[โ€“] [email protected] 2 points 12 hours ago

omz reload

not going to say zsh is better than bash or fish, but oh-my-zsh does make it more attractive for some use-cases

[โ€“] [email protected] 14 points 18 hours ago (1 children)
[โ€“] [email protected] 3 points 11 hours ago (1 children)

I sometimes hit ls and then need to type dir.

[โ€“] [email protected] 4 points 8 hours ago

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

[โ€“] [email protected] 7 points 18 hours 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.

[โ€“] [email protected] 49 points 1 day ago* (last edited 19 hours ago) (3 children)

cd then ls then cd then ls maybe Iโ€™ll throw a ls -a

[โ€“] [email protected] 6 points 8 hours ago

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

[โ€“] [email protected] 1 points 7 hours ago

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

load more comments (1 replies)
[โ€“] [email protected] 5 points 18 hours ago* (last edited 18 hours ago) (1 children)
[โ€“] [email protected] 1 points 2 hours ago

And you mistype it as fsck

load more comments
view more: next โ€บ