RUNCON(1)

๐Ÿ“ฆ
version 9.10 ยท 5 versions
, in ubuntu stonking

๐Ÿ’– RUNCON ๐Ÿ’– โ€” the runcon(1) page, bestie edition

okay so picture this: you're on a Linux box, SELinux is running the show, and you need a command to run inside a specific security context. that's runcon. it lives in User Commands, section 1 of the manual. let's get into it ๐Ÿซถ


โœจ NAME โœจ

runcon โ€” run command with specified security context


๐ŸŒธ SYNOPSIS ๐ŸŒธ

runcon [CONTEXT COMMAND [ARG]...]
runcon [-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [ARG]...

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Run COMMAND with a completely-specified CONTEXT, or with the current security context โ€” or a transitioned one โ€” that's been tweaked by one or more of LEVEL, ROLE, TYPE, and USER. it's giving "I know exactly where I belong" โœจ

If none of -c, -t, -u, -r, or -l is specified, the first argument is used as the complete context. Any additional arguments after COMMAND are interpreted as arguments to the command. so like, order matters, bestie ๐Ÿ‘‘

โš ๏ธ real talk: only carefully-chosen contexts are likely to run successfully. you can't just throw vibes at SELinux and hope. it WILL humble you.

Run a program in a different SELinux security context. With neither CONTEXT nor COMMAND, print the current security context. cute lil "who am I rn" moment ๐Ÿ’…

Mandatory arguments to long options are mandatory for short options too. (say it with me now ๐Ÿ“ฃ)

CONTEXT : Complete security context. the whole thing, full fit, no skips ๐ŸŽ€


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -c, --compute โ€” compute process transition context before modifying. do the math first, then change the outfit ๐Ÿงฎ
  • -t, --type=TYPE โ€” type (for same role as parent). staying in the family role, just switching up the type โœจ
  • -u, --user=USER โ€” user identity. who you're being, basically ๐Ÿชช
  • -r, --role=ROLE โ€” role. main character energy, but like, a specified main character ๐ŸŒŸ
  • -l, --range=RANGE โ€” levelrange. the range, the whole range, nothing but the range ๐ŸŒˆ
  • --help โ€” display this help and exit. always peek before you leap, bestie ๐Ÿ™ˆ
  • --version โ€” output version information and exit. for the girlies who need to know which version ate ๐Ÿ“Œ

๐Ÿšฆ Exit status: ๐Ÿšฆ

  • 125 โ€” if the runcon command itself fails ๐Ÿ˜ญ
  • 126 โ€” if COMMAND is found but cannot be invoked ๐Ÿ’€
  • 127 โ€” if COMMAND cannot be found ๐Ÿ•ต๏ธ
  • - โ€” the exit status of COMMAND otherwise. otherwise you just inherit whatever energy the command brought ๐Ÿ’œ

๐ŸŒŸ AUTHOR ๐ŸŒŸ

Written by Russell Coker. thank you king ๐Ÿซถ


๐Ÿ™‹ REPORTING BUGS ๐Ÿ™‹


๐Ÿ’œ SEE ALSO ๐Ÿ’œ


and that's the whole page, no cap โœจ

packaged by Ubuntu (9.10-1ubuntu2) โ€” shoutout to the packagers, iconic behavior ๐Ÿ’…

Copyright ยฉ 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (read it again, bestie โ€” no warranty fr fr ๐Ÿซฃ)

GNU coreutils 9.10 ยท August 2026 ยท RUNCON(1) โ€” okay bye ily, go run something in a context that slays ๐Ÿฆ‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from