What Type of Command is mkdir: Internal or External?

0
11
Asked By CuriousCoder87 On

I'm a bit confused about the command types in Linux. There are internal (built-in) commands and external (pre-installed) commands, right? I'm trying to figure out which category the mkdir command falls into. I've seen some sources stating it's internal, but it seems to be pre-installed as well. When I type 'type mkdir' in the terminal, it outputs '/usr/bin/mkdir'. Shouldn't it indicate that it's a built-in command instead?

4 Answers

Answered By TechWhiz42 On

mkdir is likely built into BusyBox, which can be customized, but it isn’t part of your shell directly. So, both sides of the argument can be correct!

Answered By POSIXGuru On

The /bin directory has the basic commands as defined by the POSIX standard. In short, these are considered basic commands. It may help to remember that most commands aren’t strictly part of the command-line interface itself, as there's only a handful of internal commands.

Answered By CommandSleuth On

If you can list a command using 'help xyz', then it's considered a built-in command. That being said, there are commands that have both a built-in and an external version, often with documentation noting they're built-in on your system.

Answered By BashFanatic99 On

Technically, many commands are considered internal since they're actually programs. Just to clarify, the BASH manual lists specific internal commands that BASH manages directly, such as alias, echo, and type.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.