Skip to content

Instantly share code, notes, and snippets.

@saji89
Last active December 29, 2015 23:59
Show Gist options
  • Save saji89/7746329 to your computer and use it in GitHub Desktop.
Save saji89/7746329 to your computer and use it in GitHub Desktop.
Some commands for the linux world

Some Linux Tips

Kill problematic application/process in Linux

If you experience a freeze in the display due to different reasons(mostly memory related), if you're able to reach to one of the virtual terminals

Ctrl+Alt+(F1/F2/F3/F4/F5/F6), you can kill the rogue app you believe to have caused the freeze. Let us assume that the rogue app is Firefox. First search for the Processid(pid) of the app, I use the following for that:

ps aux| grep 'firefox'

Sample Output:

  saji@geeklap:~$ ps aux|grep 'firefox'
  saji      4097 11.3  8.4 1134004 343848 ?      Sl   09:30   9:59 /usr/lib/firefox/firefox
  saji      8112  0.0  0.0   4392   832 pts/1    S+   10:59   0:00 grep --color=auto firefox

In the above 4097 is the process id we need, now you can kill the process by using:

    sudo kill 4097

Clearing the apt cache, to save some space

    sudo apt-get clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment