I'm currently trying to add a new command to Minix. I want to add a command named
smile, which I want to display continuously a smiling face
:-)the same way the command
yes do with
I already created the
smile dir in src/commands, with smile.c and Makefile, and added
smile to src/commands/Makefile.
But after compiling I still get
smile: not found
Is there another file/header/script where I must add a reference to smile?
Thank you in advance!
You either need to specify the directory, or the directory must be part of the
PATH environment variable.
if the program is in the current directory.
export PATH=".:$PATH" smile
to always check the current directory for commands during this bash session.
If the program is in a subdirectory (eg.
src/commands/smile) relative to the current directory,
you can add that to the path instead. Either explicitly,
or by adding to the search path
export PATH="src/commands/smile:$PATH" smile
placing your executable in the /usr/bin folder will allow the shell to recognize it. you should be able to type #smile now