For example, I run: php -S localhost: 8080, that's it, the console is busy, you need to open a new one. But, there is a team that will allow you to continue working in the same window.
3 answers
If the process is already running, and you need the same console, you can put the process to sleep with Ctrl-Z , and then resume it in the background (background) with the bg command.
- I did not immediately understand how this works. But this is the command that I once saw in one article that I forgot and decided to ask here! - Skit
|
You can use & - translates the process into background :
$ php -S localhost:8080 & You can use screen :
$ screen new_screen> php -S localhost:8080 нажатие одновременно CTRL+A+D - возвращает нас в родительскую консоль $ screen -r - обратное подключение к созданному screen-у Additional Information :
- https://www.digitalocean.com/community/tutorials/how-to-use-bash-s-job-control-to-manage-foreground-and-background-processes
- https://unix.stackexchange.com/questions/76717/bash-launch-background-process-and-check-when-it-ends
- http://help.ubuntu.ru/wiki/screen
- http://www.rootfront.com/article/10033021/2013-10-30/10-primerov-komandy-screen-dlja-upravlenija--linux-terminalom
|
For such cases, there is tmux. tmux new we create session, tmux attach switch.
- oneYou can just
tmux. - don Rumata
|