Difference between Ctrl-D, Ctrl-Z, Ctrl-C

Firstly, I wonder what is the difference among Ctrl-d, Ctrl-c, and Ctrl-z in linux terminal, Since I found that sometimes it affects the current process, and makes some programs run abnormally, when I am using different command, here I share the difference between those command :

  • Ctrl-D : Used to terminate input or exit the terminal or shell
  • Ctrl-C : Used to suspend foreground processes
  • Ctrl-Z : Used to kill foreground processes

So if we want to kill the process clearly, it’s better to use Ctr-c instead of Ctrl-z, since Ctrl-z only paused the process

Advertisements

2 thoughts on “Difference between Ctrl-D, Ctrl-Z, Ctrl-C

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s