Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

putty command running after disconnect

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
pkladisios
Posts: 32
Joined: 2016-10-18 13:04

putty command running after disconnect

#1 Post by pkladisios »

Greetings!

I am using putty in order to remotely control a debian computer.
Assuming that a terminal command needs to run for a long period of time, is there a way for the command to persist after putty disconnection?
If it is not possible with putty, is it there an alternative?

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: putty command running after disconnect

#2 Post by Aki »

Hello,
You can use the screen command or similar commands
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Victor Brand
Posts: 26
Joined: 2021-09-10 16:35
Location: St. Petersburg, Russia
Been thanked: 4 times

Re: putty command running after disconnect

#3 Post by Victor Brand »

An alternative to the screen command is tmux.
Another way is to press Ctrl-Z in the terminal while the long running command is performing and then enter the 'disown' command. The program will be disowned from the terminal, i.e. it will persist after the terminal is closed.

pkladisios
Posts: 32
Joined: 2016-10-18 13:04

Re: putty command running after disconnect

#4 Post by pkladisios »

Thanks for your suggestions. I will certainly try them.
I also found about the command nohup. It looks convenient, although it is unclear whether it is possible to bring back the running command.

Post Reply