Open In App

builtin command in Linux with examples

Improve
Improve
Like Article
Like
Save
Share
Report

builtin command is used to run a shell builtin, passing it arguments(args), and also to get the exit status. The main use of this command is to define a shell function having the same name as the shell builtin by keeping the functionality of the builtin within the function.

Syntax:

builtin [shell-builtin [arg ..]]

Example: Here, we are creating a function to replace the ‘cd’ command. When you will use cd() function it will change the directory to the desktop directly.

builtin –help Command: It displays help information.


Last Updated : 15 May, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads