tldr
is great. Basically a crowd-sourced alternative toman
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
Well…slap my ass and call me Mary…
Thanks kind internet stranger!:O
Woah, that’s dope as heck. Thank you!
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 superiorclear
)ii .
(short forInvoke-Item .
which runs the selected object using the default method. For paths (like.
) the default is explorer, soii .
opens the current directory using explorer.)ft
(short forFormat-Table
formats piped input as a table.)fl
(short forformat-like
. Used likeft
but for lists.)Where-Object
Select-Object
Fucking hell Lol 😂
There are dozens of us.
Also, I’ll add:
- Get-Help
- Get-Command
- Get-Member
ls and cd
I sometimes hit ls and then need to type dir.
The amount of times i tried to dir in linux and ls in windows is mire than I like to admit
I use
atuin
(link) all the timedeleted by creator
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 directoryxdg-open .
. Should work on any compliant desktop environment (gnome/kde).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.
exit
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.
I’ve recently started using
tmux
when starting a new SSH session to try to build the habit.g-push
which is alias forgit push origin `git branch --show`
Which I’m writing on my phone without testing or looking
git config --global alias.pusho 'push --set-upstream origin HEAD'
You’re welcome.
So that’s making
git push
always push to the current branch?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’tmatching
,git push
without arguments will only push the current branch.
git push origin HEAD
is a slightly shorter way of doing the same thing, even though you have an alias anyway lol
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
Chuck the -y in there for extra lazy mode
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.
topgrade
does this and and a lot more
deleted by creator
I have
cd && clear
aliased ashome
Lazy aliases unite!
exec $SHELL -l
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
omz is bloat and slows fown your shell a lot. Just do this: https://www.youtube.com/watch?v=21_WkzBErQk
And I’d recommend starship for a custom prompt, it’s really good: https://starship.rs
Edit: For other ZSH nice-to-haves: https://www.youtube.com/watch?v=eLEo4OQ-cuQ
I’ll have to give starship a try, seems like a cool way to handle customizing the prompt
as to the “omz is bloat and slows down your shell”:
- How slow? Because I’ve never noticed. Are we talking about waiting for 15 seconds when I should only have to wait for 1, or are we talking theory and the difference between 0.5 vs 0.08 seconds in benchmarks?
Because I’ve never been inconvenienced by the speed of my shell nor terminal emulator, despite having tried all kinds of setups. Turns out that “blazing fast” gpu accelerated terminal really didn’t make much of a difference on human timescales. Now I’m at the point where I appreciate the features over the performance.
- In reply to Brody’s point, I’m inclined to say “yes, and…?”
OMZ automates a lot. Sure, I could follow his way of manulaly sourcing dozens of individual shellscripts and making my own aliases and have a zshrc 1200 lines long… Or I could just let omz handle it.
Yes it’s mostly just a plugin manager, and…? Yes it automates a process I could do manually, and… ? Yes, it uses bindings that I didn’t personally write, and… ?
Fuck off with the clickbait “You’re living your life wrong, do this lifehack instead!!!” (and the lifehack is to reinvent the wheel) bullshit
Here’s a fun real lifehack: try things out for yourself, don’t just listen to and parrot other people’s opinions, don’t be afraid to go against the grain. Way more fun and fulfilling that way!
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.
sudo
doas
Zoxide, dust, fd, rg, btm, tokei. So many newer Rust tools that are way better than the old stuff.
I do love
fuck
.And you mistype it as fsck