Using builtin Command In Linux- Examples
builtin command in Linux platform allows users to run a shell builtin, passing it arguments (args) and to get the exit status. Primarily, this command is used to define a shell function that have the same name as shell builtin. It keeps the functionality of builtin within the function.
Syntax to use builtin command in Linux
builtin [shell-builtin [args]]
Options available to use with builtin command
–help: Displays help information and exits
Examples of builtin command
1: Displaying help information
builtin --help
Output
2: Replacing the cd command to change directly directly to /var/www/
cd() > { > builtin cd /var/www/ > }
then…run cd
Output: [email protected]:~/var/www$