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

Also Read:   Linux cal command Examples

–help: Displays help information and exits

Examples of builtin command

1: Displaying help information

builtin --help
builtin command in Linux

2: Replacing the cd command to change directly directly to /var/www/

> {
> builtin cd /var/www/
> }

then…run cd


[email protected]:~/var/www$


Nishant Verma is a senior web developer who love to share his knowledge about Linux, SysAdmin, and more other web handlers. Currently, he loves to write as content contributor for ServoNode.