Skip to main content

Featured

Integrating "linux command" and "docker" with "AI" enabled Python Code

Hello friends, I hope you all are good, as we all know today our world is growing like "bamboo plant" in terms of technologies , and this becomes very important to us too ,to grow with it if we want to become successful in any domain related to tech, day by day we come in interaction with very amazing and useful technologies , such powerful technologies which we have never even thought about. This all becomes possible in this rapid growing world , only with the help of some powerful tools that we see these wonders around us. Great innovators who are working day and night to make something very realistic to help humankind has totally changed the world in a better way. AI, Machine Learning, DevOps, Python and the beauty of Linux have helped in every aspect, to make everything possible whatever we can think of . Today my article is all about becoming an "Innovator" rather than working on pre existing technologies our whole life, So when we are thinking of bu...

What is the Difference between "ctrl+c" and "ctrl+z" on Linux Terminal ?

Hello friends,
hope you guys are good ,today we gonna learn the very basic but the most important difference between "ctrl+z" and "ctrl+c" while working on linux terminal.

Why we shouldn't use "ctrl+z" to terminate program on linux terminal

 

So, as most of us uses ctrl+z most of the times  to terminate any running program, and it seems like it has been terminated but actually  "ctrl+z" isn't the proper command to termiante any ongoing process.

For example, i have launched a program called gedit in Linux(ubuntu or any other distro of linux).



Then i pressed "ctrl+z" to terminate this gedit and you can see the picture below it has been terminated.


But guys this program didn't quit, the command "ctrl+z" doesn't terminate the ongoing program, it just push the program in background or we can say it stops the program. To verify if the program is still running in the background we can use command called "jobs", this will show us all the stopped programs running in the background or are at hold in the background.


now we can see  our one process running in the background with the process id mentioned, now if we want to bring this process in foreground then for this we have to a command called "fg" followed by the process id of the particular process which we want to bring up, here the process id of gedit is mentioned as "1", to bring this process in foreground we have to write "fg 1" , thats it 


Now we can terminate our program with command "ctrl+c" which actually terminates it , we can verify it again by command "jobs" after using "ctrl+c"
if there is still any process running in background.




Sometime you guys must have seen that our system becomes lazy or lags too much and we without bothering the reason behind this lagging of our system just,reset it or reinstall our operating system to resolve the problem,

Sometimes the main reason behind this slow functioning of pc is repeated use of "ctrl+z" in place of "ctrl+c", which consumes space in background day by day and our pc becomes slow.

So, now onward never use ctrl+z to terminate any ongoing process .

that's all in this article, for more such interesting tricks keep visiting our website.

Buy coffee for author


Comments

Popular Posts