1

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 y.

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
smile: not found 

Is there another file/header/script where I must add a reference to smile?

Thank you in advance!

HappyRave
  • 175
  • 1
  • 4
  • 11
  • what did you do to resolve the issue? How did you generate the executable for smile and move it to /usr/bin? – JRG Oct 07 '17 at 06:46

2 Answers2

1

You either need to specify the directory, or the directory must be part of the PATH environment variable.

Try

./smile

if the program is in the current directory.

or

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,

src/commands/smile/smile

or by adding to the search path

export PATH="src/commands/smile:$PATH"
smile
luser droog
  • 18,988
  • 3
  • 53
  • 105
0

placing your executable in the /usr/bin folder will allow the shell to recognize it. you should be able to type #smile now

jnoo
  • 1