this post was submitted on 21 Sep 2024
160 points (96.0% liked)

Asklemmy

43411 readers
2036 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_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] notfromhere@lemmy.ml 28 points 1 day ago (7 children)

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.

[–] gitamar@feddit.org 8 points 20 hours ago (2 children)

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.

[–] krash@lemmy.ml 4 points 19 hours ago

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

[–] 7dev7random7@suppo.fi 2 points 19 hours ago

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

[–] papertowels@lemmy.one 7 points 21 hours ago (1 children)

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

[–] pyr0ball@sh.itjust.works 2 points 11 hours ago (1 children)

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

[–] papertowels@lemmy.one 2 points 11 hours ago (1 children)

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

[–] Sorse@discuss.tchncs.de 2 points 9 hours ago

shutdown -r now

[–] verdare@beehaw.org 3 points 18 hours ago

Don’t use screen, but I do use tmux pretty heavily.

[–] sgtlion@hexbear.net 8 points 1 day ago (2 children)

I would know this as tmux, is there a difference?

[–] huf@hexbear.net 7 points 22 hours ago (1 children)

no, tmux is a newer screen. some of us havent switched cos we're too lazy i guess? i think the common wisdom is that it's better. i havent tried cos i already know enough of screen and it's fine for me

[–] papertowels@lemmy.one 6 points 21 hours ago (1 children)

Or you can learn both and spend the rest of your life trying screen commands in tmux and vice versa.

[–] huf@hexbear.net 1 points 21 hours ago
[–] naught@sh.itjust.works 1 points 23 hours ago

gnu screen is just a different program than tmux. they do the same thing though

[–] krash@lemmy.ml 1 points 19 hours ago (1 children)

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?

[–] darvit@lemmy.darvit.nl 1 points 15 hours ago

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

[–] tetris11@lemmy.ml 4 points 1 day ago

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

[–] muzzle@lemm.ee 2 points 23 hours ago (1 children)

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

[–] 7dev7random7@suppo.fi 1 points 19 hours ago

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

man terminal_of_choice, look for (start) command.