LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2008, 05:28 PM   #1
Nzo
LQ Newbie
 
Registered: Jun 2008
Posts: 19

Rep: Reputation: 0
how do I stop a shell terminal?


OK so im using the linux shell, but sometimes i run a program, and it keeps outputting to the terminal.

How do I stop it without exiting the current terminal?

I have tryed Esc key but it enters ^[ into the window!

Thanks
 
Old 09-14-2008, 05:31 PM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Send stdout and stderr to /dev/null:

./myprogram 2>/dev/null 1>&2
 
Old 09-14-2008, 05:32 PM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Standard terminal bindings are:

Control-C: kill foreground process
Control-Z: Stop foreground process
Control-S: Suspend output from foreground process
Control-Q: Resume output from foreground process

There is also a flush output binding, but doesn't work reliably.

See:

stty -a
bind -p
man stty # TTY driver key bindings
man bash # search for readline key bindings
 
Old 09-14-2008, 05:32 PM   #4
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Ctrl+C should work. It's the Ctrl and the c keys pressed together.
 
Old 09-14-2008, 05:34 PM   #5
Nzo
LQ Newbie
 
Registered: Jun 2008
Posts: 19

Original Poster
Rep: Reputation: 0
ok cool, thanks very helpful.

still gettin used to all this linux stuff!
 
Old 09-14-2008, 05:36 PM   #6
Nzo
LQ Newbie
 
Registered: Jun 2008
Posts: 19

Original Poster
Rep: Reputation: 0
ctrl C is perfect
 
Old 09-14-2008, 05:44 PM   #7
Reasa
Member
 
Registered: Aug 2008
Distribution: Slackware
Posts: 53

Rep: Reputation: 16
ctrl+z brings you back to shell, but program keeps on running. type "fg" (fore-ground) to bring it back again.
you can read up this:
http://rute.2038bug.com/node12.html....00000000000000
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Terminal functions for shell scripting with Shell Curses LXer Syndicated Linux News 0 03-27-2008 12:50 AM
stop gnome terminal from starting kafnir Linux - General 1 10-10-2007 01:20 PM
How to completely stop terminal output? stankelay Programming 6 08-20-2007 06:34 AM
LXer: Shell tip: Set the shell prompt and themes in Linux Terminal LXer Syndicated Linux News 0 06-12-2007 04:02 AM
How to stop terminal escape sequences ? Mike Davies Linux - Newbie 1 08-08-2004 12:37 PM


All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration