How do I cancel/close a process executed in the terminal correctly?

Hi friends.

Sometimes, I execute in the terminal some processes that never finish, like for example glances, or any other.

I don’t know how a process should be terminated, and whether that process can be broken if I forcefully close it, but since I don’t know how to close it, I always forcefully close it by closing the terminal, and I get an alert message.

How should I kill the process before closing the terminal properly?

Also how should I abort an active process, such as yay -S, when I’m installing a program, and it asks me which dependency I want to install, 1, 2, 3, or 4, but I want to abort the install and I press 0 to abort, and it does not work. So in this case, how do I cancel the installation of the program?

Sorry if these are dumb questions, but I really don’t want to break any process or anything and I want to do it the official/correct way.

Thanks in advance.

Pressing Close window should be fine in your screenshot.
But generally speaking Ctrl + C quits currently running terminal program.



Works! So, I can use both methods without problem, right? Great!

By the way, that explains why my commands don’t work when I paste them with Ctrl+C…

Thanks my friend!

Yes :laughing:

To do copy in terminal:

Ctrl + Shift + C

To do paste in terminal:

Ctrl + Shift + V

1 Like

Thanks for the keyboard shortcut, it works!

Although I already got used to right click > paste :laughing:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.