Forrest logo
back to context overview

chcon

List of commands for chcon:

  • chcon:tldr:13993 chcon: Change only the range/level part of SELinux security context.
    $ chcon -l ${range-level} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:38cf4 chcon: Change only the user part of SELinux security context.
    $ chcon -u ${user} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:50679 chcon: Change only the type part of SELinux security context.
    $ chcon -t ${type} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:520ea chcon: Change only the role part of SELinux security context.
    $ chcon -r ${role} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:b3ffa chcon: View security context of a file.
    $ ls -lZ ${filename}
    try on your machine
    explain this command
  • chcon:tldr:ca67a chcon: Change the full SELinux security context of a file.
    $ chcon ${user}:${role}:${type}:${range-level} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:d1b00 chcon: Change the security context of a target file, using a reference file.
    $ chcon --reference=${reference_file} ${target_file}
    try on your machine
    explain this command
back to context overview