GNU/Linux >> Tutoriels Linux >  >> Linux

Si vous ^z à partir d'un processus, il est « arrêté ». Comment revenir en arrière ?

J'ai "arrêté" accidentellement mon telnet processus. Maintenant, je ne peux ni "y revenir", ni le tuer (il ne répondra pas à kill 92929 , où 92929 est l'ID de processus.)

Donc, ma question est, si vous avez un processus arrêté sur la ligne de commande Linux, comment y revenir ou le tuer, sans avoir à recourir à kill -9 ?

Réponse acceptée :

Le moyen le plus simple est d'exécuter fg pour le mettre au premier plan :

$ help fg
fg: fg [job_spec]
    Move job to the foreground.

    Place the job identified by JOB_SPEC in the foreground, making it the
    current job.  If JOB_SPEC is not present, the shell's notion of the
    current job is used.

    Exit Status:
    Status of command placed in foreground, or failure if an error occurs.

Alternativement, vous pouvez exécuter bg pour qu'il continue en arrière-plan :

$ help bg
bg: bg [job_spec ...]
    Move jobs to the background.

    Place the jobs identified by each JOB_SPEC in the background, as if they
    had been started with `&'.  If JOB_SPEC is not present, the shell's notion
    of the current job is used.

    Exit Status:
    Returns success unless job control is not enabled or an error occurs.

Si vous venez d'appuyer sur Ctrl Z , puis pour ramener le travail, exécutez simplement fg sans argument.


Linux
  1. CentOS / RHEL 7 :Comment basculer vers iptables depuis firewalld

  2. Comment obtenir la valeur de retour de CHILD PROCESS ?

  3. Comment obtenir un processus enfant à partir d'un processus parent

  4. Comment terminer le processus de Python en utilisant pid?

  5. Comment supprimer/désactiver le processus Evolution Data Server

Comment j'ai aidé ma mère à passer de Windows à Linux

Comment passer de GNOME à Unity dans Ubuntu 18.04 et 17.10

Comment trouver le nom du processus à partir de son PID

Comment obtenir le PID d'un processus enfant forké dans un script shell

Comment trouver d'où un travail est soumis dans SLURM ?

Comment pouvez-vous supprimer les doublons de l'historique bash ?