Results 1 to 6 of 6

Thread: How do you stop a looping bash script?

  1. #1
    Join Date
    Oct 2004
    Beans
    456
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    How do you stop a looping bash script?

    Hi all,

    I was trying a bash script that I found on Github through terminal. At first, it was a funny little bash script, but now I can't stop it. Every time I open my terminal, the bash script starts up. I kill it by pressing "Ctl+C". but it is just a temporary stop. It restarts every time I open a new terminal.

    How can I kill this bash script permanently?

    Here is the Github link for that bash script in case someone needs to know which one.

    Thanks

    Heeter

  2. #2
    Join Date
    Sep 2009
    Beans
    41

    Re: How do you stop a looping bash script?

    Has the script planted itself in your ~/.bashrc or ~/.bash_profile?

    ...edit after reading script....
    It definitely looks to have added itself to your .bashrc
    Last edited by lvlint67; April 5th, 2013 at 07:00 AM.

  3. #3

    Re: How do you stop a looping bash script?

    restore your .bashrc from backup.

    words like "inject" with variables like "AND_HURT_YOU" should be a BIG RED FLAG.
    Windows assumes the user is an idiot.
    Linux demands proof.

  4. #4
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How do you stop a looping bash script?

    Quote Originally Posted by lvlint67 View Post
    Has the script planted itself in your ~/.bashrc or ~/.bash_profile?

    ...edit after reading script....
    It definitely looks to have added itself to your .bashrc
    If you don't have a backup, you can get a copy of the default .bashrc from /etc/skel

    Code:
    cp /etc/skel/.bashrc ~/.bashrc

  5. #5
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: How do you stop a looping bash script?

    You can also edit the file by hitting ALT+F2 and running the command...
    Code:
    gedit ~/.bashrc
    If you're not sure which line(s) need deleting the just post the contents of the file here a we can take a look.
    Cheesemill

  6. #6
    Join Date
    Oct 2004
    Beans
    456
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: How do you stop a looping bash script?

    Awesome, Thanks guys for all your guys's help.

    I opened up my bash file, and removed the offending line, and now I have my terminal back.

    Thanks again all!


    Heeter

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •