I am trying to install openstack using devstack on ubuntu 16.04. I followed the following link.
https://docs.openstack.org/developer/devstack/guides/singl
always run admin-openrc file before running any openstack command eg.
admin-openrc
$source admin-openrc
then run whatever openstack command you want to run
eg.
$openstack --debug server list