Results 1 to 9 of 9

Thread: Running a new command in the shell while the old is still running?

Hybrid View

  1. #1
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    4

    Default Running a new command in the shell while the old is still running?

    In the BT console, how can I start a new command while the old one is still running?

    I want to start aireplay-ng while airodump-ng is still running in the background.

    Pressing Ctrl+C allows me to start aireplay-ng, but it stops airodump-ng.


    In the Graphical Interface its easy, you can just open a new shell while leaving the other running in the background. But the graphical interface causes my laptop to always crash, so I am trying to do it all from the command prompt.

    Thanks

  2. #2
    Developer
    Join Date
    Mar 2007
    Posts
    6,124

    Default

    I'm not sure what you mean exactly but if you mean using multiple terminals while in the frame buffer mode rather than when X is running then you can do that with alt-f2, alt-f3 and so on.

  3. #3
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    4

    Default

    Thank you, I think that is exactly what I ment, Im just going to try it now hopefully it works

  4. #4
    Junior Member
    Join Date
    Apr 2007
    Posts
    57

    Default

    Right Click in the "shell" window and show "menu bar", start a new shell then start each process you want to run in each shell

    OR

    Code:
    airodump-ng ath0 &
    Edit: Sorry didn't read the full post.

    Use the "&" to background the process or as Pureh@te says
    One word : SEARCH

  5. #5
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default

    You can also move a process to the background by ctrl + z
    and then bg % this will return you to the prompt. To bring the process back to the foreground then fg %
    Show the status of all background and suspended jobs: jobs
    Bring a job back into the foreground: fg %jobnumber
    Bring a job back into the background: bg %jobnumber
    Where jobnumber is the number given after hitting ctrl + z

    Example
    Code:
    #netdiscover -i eth0
    then ctrl + z sends a stop signal and returns 
    [1]+ stopped  (giving a prompt) then give 
    #bg %  will send it to the background
    To be successful here you should read all of the following.
    ForumRules
    ForumFAQ
    If you are new to Back|Track
    Back|Track Wiki
    Failure to do so will probably get your threads deleted or worse.

  6. #6
    Member
    Join Date
    Jan 2010
    Posts
    159

    Default

    As archangel said, ctrl-z will put it in the background, but the process will be suspended, so "bg" will keep it going in the background. "fg" will bring that process back

    the command "jobs" will show you what is running in the background. Typing %1 will bring you to job 1, %2 brings you to job 2 etc.

    Kill %1 kills job 1.

    As pureh@te mentioned, You can also use ctrl-alt-F# where the # is a number from (IIRC) 1-6. ctrl-alt-f7 brings you back to Xwindows. Each one of these terminals requires you to log in, as they are independent. The advantage is you are not running on X at all to use these multiple terminals. (does just alt-F# work now? I remember it being ctrl-alt. I so rarely use X windows....)

    You might also want to look into the command called "screen" as well.

  7. #7
    Member imported_blackfoot's Avatar
    Join Date
    Jun 2007
    Posts
    386

    Default ampersand

    The correct method is to invoke the first command and terminate it with an ampersand. Such action will enable continued use of the shell, thus:

    emacs &

    For switching between monitoring and sending you may need to use a tunnel. (As an interface in monitor mode cannot transmit!).
    Lux sit

  8. #8
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default

    Quote Originally Posted by blackfoot View Post
    The correct method is to invoke the first command and terminate it with an ampersand. Such action will enable continued use of the shell, thus:
    You can still use the shell with ctrl +z The thing people have to remember is that with control z sends a stop signal to the program until either fore or background is entered.
    To be successful here you should read all of the following.
    ForumRules
    ForumFAQ
    If you are new to Back|Track
    Back|Track Wiki
    Failure to do so will probably get your threads deleted or worse.

  9. #9
    Just burned his ISO
    Join Date
    Mar 2009
    Posts
    4

    Default

    Thank you for the replies. Using the Alt+F# worked fine for what I wanted to do. Ill give the other suggestions a try when I get a bit more free time

Posting Permissions

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