taskset -pc 2 1234

Category: Administration

taskset -pc 2 1234

Move a running process to a CPU

The -pc form operates on an existing process, so this migrates process 1234 onto CPU 2 without restarting it. It prints the old and new affinity lists on success. Use it when a process ends up on a busy core and you cannot stop it.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.