How to use the kill command in Linux (Linux Crash Course Series)

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ต.ค. 2024

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

  • @LionHeart1104
    @LionHeart1104 23 วันที่ผ่านมา

    No. 1 Linux course on TH-cam & I think nobody can teach better than you who are selling their courses. Thanks very much Jay for your contributions.

  • @sussusamogus7831
    @sussusamogus7831 2 หลายเดือนก่อน +4

    I love these tutorials, thanks, Jay! Loved the Klingon description :)

  • @David-XCsoaring
    @David-XCsoaring 2 หลายเดือนก่อน

    Thanks Jay, a nice level of detail for a command I have only ever used in its raw form of just “kill”. Linux is such a rich operating system you just never stop learning new things.

  • @RavenOfLaughter
    @RavenOfLaughter 2 หลายเดือนก่อน +2

    Great tutorial, Jay. I appreciate the effort.

  • @scottmcbrien6535
    @scottmcbrien6535 2 หลายเดือนก่อน +2

    I was sad to see that we start the discussion with -9. The default used by kill is 15 (SIGTERM) which basically is sent to the target process indicating that it should terminate. This allows it to GRACEFULLY organize it's own termination. Closing open file handles, deallocating memory, closing ports, or really whatever it needs to do to smoothly shutdown.
    Conversely, -9 simply wipes the process from the system. By not performing a graceful termination, things can be left in an uncertain state. During the runtime of the machine, as the kernel interacts with these leftovers, it'll figure out that there's not a process associated with the resource any longer and reconcile it. But it takes compute time to do so and if the process had something in memory that it had not yet written to disk, for example, that data is going to be lost forever.
    There are, of course, times when you need to use -9 (SIGKILL) because the process is not able to process the terminate or maybe someone has written the program to ignore SIGTERM, but in my experience, those times are few. One should always try to kill -15 (or no options as 15 is the default) a process, then provide some time for the process to gracefully terminate, before using kill -9.
    As a programmer, you can write signal handling into your application, for example, the dd command will print a status when it receives SIGUSR1 (10). If you'd like to see that in action:
    dd if=/dev/zero of=/dev/null &
    (this will run a dd process in the background on your terminal, as part of the invocation it'll tell you the process ID number of the process)
    kill -10
    Because this process is running in the background, to then terminate it, kill
    -Your Friendly Neighborhood RHEL Red Hatter.

  • @Ranblv
    @Ranblv 2 หลายเดือนก่อน

    very useful especially pidof

  • @digital0ak
    @digital0ak 2 หลายเดือนก่อน +3

    Glad I clicked! Thanks!

  • @GrishTech
    @GrishTech 2 หลายเดือนก่อน +8

    Not a bot, but I love Linux

    • @iraqinationalist7778
      @iraqinationalist7778 2 หลายเดือนก่อน +1

      It sad people have say they are not a bot

  • @awalden
    @awalden 2 หลายเดือนก่อน

    I always learn something useful! Many thanks! 🍷🍷

  • @defranken
    @defranken 12 วันที่ผ่านมา

    That green glow looks awesome, is that some kind of theme of your window manager? Or is that just edited into the video?

  • @viktor4840
    @viktor4840 2 หลายเดือนก่อน

    1:05 🖖

  • @mathieuberthalay21
    @mathieuberthalay21 2 หลายเดือนก่อน +1

    Thank you for your video 🤩

  • @danilodistefanis5990
    @danilodistefanis5990 2 หลายเดือนก่อน

    You can also do kill -s HUP without the sig prefix.

  • @h3sam
    @h3sam 2 หลายเดือนก่อน +1

    great video!
    i have a question though; what launcher did you use in your video? was it ulauncher?

    • @thatonedude1210
      @thatonedude1210 2 หลายเดือนก่อน +1

      Looks like the Pop!_OS launcher

  • @tatsutakamaro
    @tatsutakamaro 2 หลายเดือนก่อน

    Does it (i mean the default -15 flag) return different values on whether the process was killed or not? Or should we check it in an if atatement after?

  • @maksimkurchynskiy2723
    @maksimkurchynskiy2723 2 หลายเดือนก่อน

    on my server logrotate is sending -HUP signal to rsyslog PID when rotating logs

  • @fribook
    @fribook 2 หลายเดือนก่อน

    boa tarde amigo
    pode fazer video install libtorrent/1.2.2.0 in linux.
    thanks

  • @ankit7319
    @ankit7319 หลายเดือนก่อน

    10:00 why creating content like this is not cheap? They are simple tutorial videos

  • @bluecup25
    @bluecup25 2 หลายเดือนก่อน +1

    I'm afraid to type the k word in the comments because yt will most likely shadow b me

  • @sotecluxan4221
    @sotecluxan4221 2 หลายเดือนก่อน

    !!!