Friday, May 3, 2024
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 634  / 2 Years ago, fri, august 19, 2022, 12:15:28

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?


More From » command-line

 Answers
5

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.


[#37088] Saturday, August 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
serveeel

Total Points: 347
Total Questions: 106
Total Answers: 117

Location: American Samoa
Member since Fri, Aug 26, 2022
2 Years ago
serveeel questions
;