Disabling the shell prompt can simplify user interactions with the system, prevent inexperienced users from executing potentially harmful commands that might cause system instability or data loss, and reduce the risk of unauthorized changes to system settings or configurations.
Procedure
-
Create a plain text
/etc/dconf/db/local.d/00-lockdown keyfile in the /etc/dconf/db/local.d/ directory with the following content:
[org/gnome/desktop/lockdown]
# Disable command prompt
disable-command-line=true
-
Create a new file under the
/etc/dconf/db/local.d/locks/ directory and list the keys or subpaths you want to lock down:
# Lock command prompt
/org/gnome/desktop/lockdown/disable-command-line
-
Apply the changes to the system databases:
-
Log out and log in again for the changes to take effect.