159
submitted 3 days ago by marighost@piefed.social to c/linux@lemmy.ml

I've been setting up a new Proxmox server and messing around with VMs, and wanted to know what kind of useful commands I'm missing out on. Bonus points for a little explainer.

Journalctl | grep -C 10 'foo' was useful for me when I needed to troubleshoot some fstab mount fuckery on boot. It pipes Journalctl (boot logs) into grep to find 'foo', and prints 10 lines before and after each instance of 'foo'.

(page 3) 35 comments
sorted by: hot top controversial new old
[-] marcie@lemmy.ml 2 points 2 days ago

rpm-ostree status

rpm-ostree reset

rpm-ostree rebase

idk i love rpm-ostree man

[-] GaryGhost@lemmy.world 1 points 2 days ago

ps -ef | grep <process_name

Kill -9 proces id

I googled that -15 is better, I forgot what -9 even did, been using it for years.

load more comments (3 replies)
[-] Magister@lemmy.world 2 points 2 days ago* (last edited 2 days ago)
alias cd..='cd ..'
alias ll='LC_COLLATE=C ls -alFh'
alias ls='ls --color=auto'
load more comments (2 replies)
[-] hades@feddit.uk 2 points 3 days ago

Number one will forever and ever be strace

[-] gangrif@social.undrground.org 2 points 3 days ago

@marighost I dont use Prox, but for various random linux commands.. ive got a wealth. :D in the journalctl vein.

journalctl -xeu \<service name\>

ex: journalctl -xeu httpd

Gives you the specific journal output for the given service. In this example. httpd.

Also, journalctl is more than boot logs, its all of your logs from anything controlled by systemd. Mounts, services, timers, even sockets.

For example. On my system, i have /var/home as a mount. systemctl and journalctl can give me info on it with:

systemctl status var-home.mount
journalctl -xeu var-home.mount

You can see all of the mounts with.
systemctl list-units --type=mount

Or, see all of your services with
systemctl list-units --type=service

Or all of your timers with
systemctl list-timers

We do a weekly show on getting into linux terminals, commands, tricks, and share our experience.. It's called Into the Terminal. on the Red Hat Enterprise Linux youtube channel. I'll send you a link if you're interested.

[-] crispycone@lemmy.zip 2 points 3 days ago* (last edited 3 days ago)

Deleted comment.

I double posted as Mlem didn’t show my initial comment after posting for some reason.

(Edit)

[-] Bluegrass_Addict@lemmy.ca 2 points 3 days ago
[-] crispycone@lemmy.zip 1 points 3 days ago

I double posted as Mlem didn’t show my initial comment had posted.

I should have done an edit delete.

[-] Bluegrass_Addict@lemmy.ca 2 points 2 days ago

lol I just wanted people to question what was said.

[-] corsicanguppy@lemmy.ca 1 points 2 days ago

Journalctl | grep -C 10 'foo' was useful for me when I needed to troubleshoot some fstab mount fuckery on boot.

Ha! Remember back when there was no fstab fuckery? Good times. But you have a massive init blob slowly eating other services and replacing them with shitty replicants like this embarrassment (ohai root NFS) and all of us Unix people are chuckling in our reduced-fuckery 'hell'.

[-] Geodes_n_Gems@lemmy.ml 1 points 2 days ago

Running Wine is the command I've used the most probs, you can tell I haven't touched the thing in months.

[-] fhein@lemmy.world 1 points 3 days ago

These aliases for zsh I use all the time. It's part of the prezto configuration framework.

setopt AUTO_CD              # Auto changes to a directory without typing cd.
setopt AUTO_PUSHD           # Push the old directory onto the stack on cd.
setopt PUSHD_IGNORE_DUPS    # Do not store duplicates in the stack.
setopt PUSHD_SILENT         # Do not print the directory stack after pushd or popd.
setopt PUSHD_TO_HOME        # Push to home directory when no argument is given.

alias d='dirs -v'
for index ({1..9}) alias "$index"="cd +${index}"; unset index

Type d and enter to list all the directories you've recently been in, then type the number at the start of the line followed by enter to immediately cd there.

Not sure if latest bash can do it the same thing, but some years ago I wrote a script to implement it there too. IIRC it might've been the automatic removal of duplicates in dir history that was missing.

[-] furrowsofar@beehaw.org 1 points 3 days ago* (last edited 3 days ago)

Various uses of "find" in particular. "xargs" sometimes too. The capabilities of "bash" in general including scripting and the whole redirection, piping, and multiprocessing capabilities in particular.

load more comments
view more: ‹ prev next ›
this post was submitted on 16 Dec 2025
159 points (98.2% liked)

Linux

57274 readers
398 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS