this post was submitted on 03 Jan 2025
374 points (98.2% liked)

Linux

48885 readers
955 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 5 years ago
MODERATORS
 

Which Linux command or utility is simple, powerful, and surprisingly unknown to many people or used less often?

This could be a command or a piece of software or an application.

For example I'm surprised to find that many people are unaware of Caddy, a very simple web server that can make setting up a reverse proxy incredibly easy.

Another example is fzf. Many people overlook this, a fast command-line fuzzy finder. It’s versatile for searching files, directories, or even shell history with minimal effort.

you are viewing a single comment's thread
view the rest of the comments
[–] Semi_Hemi_Demigod@lemmy.world 40 points 5 days ago (5 children)

I'm a big fan of screen because it will let me run long-running processes without having to stay connected via SSH, and will log all the output.

I do a lot of work on customers' servers and having a full record of everything that happened is incredibly valuable for CYA purposes.

[–] gkaklas@lemmy.zip 15 points 4 days ago

There is also zellij, which can do the same but also has modern functionality specific for development workspaces!

(Although screen or tmux will still probably be more widely available on remote machines etc)

[–] Static_Rocket@lemmy.world 14 points 5 days ago (2 children)

I'd recommend tmux for that particular use. Screen has a lot of extras that are interesting but don't really follow the GNU mentality of "do one thing and do it well."

[–] kitnaht@lemmy.world 11 points 5 days ago

Tmux / Screen is like the emacs/vim of the modern day Linux I think.

Screen is more than capable, but for those who have moved to Tmux, they will absolutely advocate for it.

[–] darklamer@lemmy.dbzer0.com 4 points 4 days ago (3 children)

When tmux was first released I was already so used to screen that I never really considered switching. What would some convincing arguments be for me to make the effort to switch now?

[–] notabot@lemm.ee 6 points 4 days ago

The thing that got me to switch was being able to maintain my pane layout between connections. The various window and pane management niceties (naming, swapping, listing and the like) got me to stay. Now you can keep your screen, but you'd have to pry tmux from my cold, dead, tty.

[–] kablammy@sh.itjust.works 0 points 2 days ago

This was a few years ago so maybe it has improved, but I found that screen would crash and lose my session history and layout too often. That was bad enough, but when it happened it had some bullshit error message about a dungeon roof falling in. I don't mind some comedy in code or even the interface, but don't make light of the user losing their stuff. I tried tmux and it is much more stable than screen was.

[–] Static_Rocket@lemmy.world 4 points 4 days ago (1 children)

Tmux was purpose built for terminal multiplexing. You can assign session names for organizing and manipulating multiple instances. Send keys to and read output from detached sessions. It's easy to script.

[–] darklamer@lemmy.dbzer0.com 5 points 4 days ago (1 children)

Tmux was purpose built for terminal multiplexing.

Was screen not purpose built for terminal multiplexing?

[–] Static_Rocket@lemmy.world 1 points 4 days ago

Sorry, it was, just not for exploring all of those instances at once. Should have called out the tiling function. Screen also built in a serial terminal emulator and started playing with a few other things.

[–] surfrock66@lemmy.world 8 points 4 days ago

I know everyone likes tmux but screen is phenomenal. I have a .screenrc I deploy everywhere with a statusbar at the bottom, a set number of pre-defined tabs, and logging to a directory (which is cleaned up after 30 days) so I can go back and figure out what I did. Great tool.

[–] villainy@lemmy.world 7 points 4 days ago (1 children)

Woah screen is seeing active development again? There was like a decade where it stagnated. So much so that different distros were packaging different custom feature patches (IIRC only Ubuntu had a vertical split patch by default?) Looking at it now, the new screen maintainers had to skip a version to not conflict with forks that had become popular.

When tmux stabilized I jumped ship immediately and never looked back.

[–] tensor_nightly69@lemmy.world 4 points 4 days ago

tmux with control mode in iterm is god mode for me on all my machines. Absolutely love it.

[–] iii@mander.xyz 6 points 5 days ago (2 children)
[–] pearsaltchocolatebar@discuss.online 3 points 4 days ago (1 children)

I've had nohup fail to keep things running after my session ended quite frequently. It's like it just goes to the next step in the process then gives up.

[–] notabot@lemm.ee 3 points 4 days ago (1 children)

It's likely that you're using a systemd based system and the admin hasn't enabled linger for your user.

[–] pearsaltchocolatebar@discuss.online 1 points 4 days ago (1 children)

The servers are very locked down, so I'm sure that's part of our compliance requirements. I haven't looked into fixing it because I just wrote a script to hit Enter every 10 minutes to keep it alive.

[–] notabot@lemm.ee 2 points 4 days ago

Ha! Faking key presses, truly an elegant weapon for a more civilized age. If it works, it works.

[–] pivot_root@lemmy.world 2 points 4 days ago

It's not as useful, sadly. Nohup disconnects standard input, output, and error. With screen or tmux, you can reattach them later.