how to kill user process in linux code example Example 1: ubuntu kill process for user pkill -u username Example 2: linux kill process by user pkill -9 -u `id -u username`