I might be that you are not running bash shell.If you are using another shell must be make change in setup file like this
source /opt/ros/kinetic/setup.bash
to
source /opt/ros/kinetic/setup.sh