Mastering Linux: Easily Create and Manage Background Jobs

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 มิ.ย. 2024
  • In this tutorial, we're going to explore the world of job control in Linux using some essential commands. Learn
    how to use `Control Z`, `Control C`, `bg`, `fg`, and `nohup` to manage your system processes like a pro.
    Timestamps
    00:00 - Intro
    00:26 - Ping command to background
    01:16 - Bring job to foreground
    02:55 - Background and pipe to file
    04:32 - NoHup command
    05:21 - Working with multiple jobs
    06:28 - Activity - Marco Polo
    09:21 - Final thoughts
    Topics covered in this video:
    Mastering the art of suspending and resuming jobs using:
    + `Control Z`: Suspending a process
    + `Control C`: Interrupting a process
    Using background jobs with:
    + `bg`: Running a process in the background
    Resuming suspended jobs with:
    + `fg`: Bringing a suspended job to the foreground
    Protecting long-running processes from termination with:
    + `nohup`: Ignoring HUP signals
    Whether you're a Linux beginner or an experienced user, this video will help you understand how to effectively use
    these commands to optimize your workflow and manage system resources. So, what are you waiting for? Watch now and
    start mastering Linux jobs!
    #linux #linuxskills #linuxcommandline #linuxadministration #linuxforbeginners #tutorial #terminal #commandline #scripting #kali #kalininux #programming #taskmanagement
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 9

  • @hunglikeahamster
    @hunglikeahamster 19 วันที่ผ่านมา +2

    You can also run a function call in a script as a background job.
    I've used that technique to spawn a few hundred threads that compete to write to a database before now.
    You need to wait for them to finish before exiting the script of course.

    • @techtimefly
      @techtimefly  19 วันที่ผ่านมา

      Well played. Appreciate you for sharing that tip.

  • @vmar3011
    @vmar3011 19 วันที่ผ่านมา +2

    If you're running your jobs trough ssh and want your jobs to be persistent after terminating the session, you can disown the job from your user session with "disown". The syntax is even similar to the presentet ones - to disown job number 3: "disown (-h) %3"

    • @techtimefly
      @techtimefly  19 วันที่ผ่านมา

      Nice! Thanks for this tip

  • @kevinhay7
    @kevinhay7 19 วันที่ผ่านมา +1

    Good video! I’ve used nohup before but the bg and fg commands along with the ctrl z is nice!

    • @techtimefly
      @techtimefly  19 วันที่ผ่านมา

      glad this was helpful. So many little tricks with linux. I’m always coming across something i didn’t know.

  • @hulumbulum4683
    @hulumbulum4683 20 วันที่ผ่านมา +1

    Thank you. I was using tmux for this, now maybe I'll reconsider my approach.

    • @techtimefly
      @techtimefly  20 วันที่ผ่านมา

      Glad the video was helpful. I hope it was easy to follow. Still working on my style

  • @nothingtoseehere5760
    @nothingtoseehere5760 14 วันที่ผ่านมา

    Why would you embed subtitles in the video picture?? It's absurd. Stop doing it. Closed captions have exited for literally half a century.