Syntax
readonly [-apf] [name] ...
Options
-f Each name refers to a shell function
-a Each name refers to an array variable
-p Print a list of all readonly names (This is the default)
The values of these names can not be changed by subsequent assignment.
The `-p' option causes output to be displayed in a format that can be reused as input.
The return status is zero unless an invalid option is supplied, one of the name arguments is not a valid shell variable or function name, or the `-f' option is supplied with a name that is not a shell function.
readonly is a bash builtin command.
"The stupid neither forgive nor forget, the naive forgive and forget, the wise forgive but do not forget" ~ Thomas Szasz (The second sin)
Related:
chmod - Change access permissions
env - Display, set, or remove environment variables
export - Set an environment variable
function - Define Function Macros
hostname - Print or set system name
local - Create variables
printenv - Print environment variables
shift - Shift positional parameters
Equivalent PowerShell cmdlet: Set-Variable -option:ReadOnly