I'm from windows background. I wish to know where do all commands like exit
,clear
comes from in my terminal?
And are they scripts? In what language they have been written?
I'm from windows background. I wish to know where do all commands like exit
,clear
comes from in my terminal?
And are they scripts? In what language they have been written?
this depends:-) Some are internal commands of your shell, some scripts, some are compiled programs.
You can find out more with the type
command: For example: type type
gives (in my cygwin bash!) type is a shell builtin
.
If you type type bash
, your answer will be something like bash is /usr/bin/bash
.
Now you can inspect what type of file /usr/bin/bash is: file /usr/bin/bash
says something like ... executable ...
, so this will be a compiled file, presumably written in C, FORTRAN or whatever. If the answer is something like ... script...
you can inspect this file with a normal text editor like gedit, vim or whatever you like.