Install globally module:

sudo npm install -g learnyounode 

How do I run it from the linux command line? In windows, you could simply enter the name if you connect it globally.

    2 answers 2

    You can run it from the command line. You need to first run the command

      rehash 

    or open a new terminal window.

    • Actually on Windows, you also need to restart the terminal, the global environment variables themselves will not catch up - Duck Learns to Take Cover
    • used the command and restarted the terminal - Klaod
    • error $ learnyounode / usr / bin / env: 'node': No such file or directory - Klaod
    • and if you run node -v from the command line, what is the result? - Mikhail Vaysman

    Updating nodejs to the latest version solved the problem.