How to check if a command is builtin?

QuestionsQuestions8 SkillsProDec, 16 2025
0101

That's a great question, and you've already used the command to do just that in the current step!

To check if a command is a builtin, you can use the type command.

Simply type type followed by the command you want to check, like this:

type <command_name>

For example, as you did in the step:

  • type cd will likely show you cd is a shell builtin.
  • type ls might show you ls is an alias for ls --color=tty (meaning it's an external command with an alias) or ls is /usr/bin/ls (indicating it's an external executable).

The type command tells you how the shell interprets and will execute the command you provide.

Let me know if you'd like to try it with another command!

0 Comments

no data
Be the first to share your comment!