var sys = require(\'sys\'), exec = require(\'child_process\').exec; exec(\"cd /home/ubuntu/distro\", function(err, stdout, stderr) { console.log(\"cd: \" +
It is working. But then it is throwing the shell away. Node creates a new shell for each exec.
exec
Here are options that can help: http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback