taskset do?set or read a process's CPU affinity (which cores it may use).
▸ Explain your own taskset command →$ taskset -c 0,1 ./prog
$ taskset -pc 0-3 1234
| -p | operate on an existing PID instead of launching a command |
| -c | give the CPU list as numbers, e.g. 0,2,5-7 (not a hex mask) |
| -a | with -p, apply to all threads of the process |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.