oreilly.comSafari Books Online.Conferences.


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.


taskset [options] [mask |list] [pid |command [args] ]

taskset is used to retrieve or set the processor affinity mask of either an existing process, given its PID, or to run a new a process, given its command name, with a specified affinity mask. The Linux scheduler will then honor the given affinity mask, ensuring that the process in question runs only on allowed processors.


-c, --cpu-list

The affinity mask will be provided in list form, for example, "0,2,5-6," not as a bitmask.

-p, --pid

Set or retrieve the mask of the given PID. Do not start a new process.

-h, --help

Display usage information and then exit.

-V, --version

Display version information and then exit.

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: