how to add program to command line linux

C++
Linux:
export PATH=$PATH:</path/to/file>
Source

Also in C++: