Terminal or shell command to shutdown or reboot Ubuntu Linux

So how do you shutdown or reboot Ubuntu Linux from a terminal or a shell prompt? If GUI is working you can always click on a Quit button. If GUI is not working or if you are working remotely over ssh type the following command:

To shutdown / poweroff Ubuntu Linux
Type the command:
sudo halt
OR
sudo shutdown -h now

To reboot Ubuntu Linux
Type the command:
sudo reboot

More information can be found about these two commands by typing following commands (man page):
man reboot
man shutdown

XEphem on Ubuntu

XEphem is an outstanding software for astronomers.It is written in C and there aren’t any packages built for it so you have to compile it using the source codes.
When building on Ubuntu, it is most likely that you’ll get some error messages, because need some libraries not included in Ubuntu by default.
Download the source code and extract it.

$ wget http://97.74.56.125/free/xephem-3.7.4.tar.gz

$ tar -xvf xephem-3.7.4.tar.gz

Before compiling, we need these packages installed.

$ sudo apt-get install libmotif3 libmotif-dev x11proto-print-dev libxp-dev libxmu-dev

If you don’t install these packages, you’ll get errors during compilation from various files, like aavso.c

Now let’s compile!

$ cd xephem-3.7.4/GUI/xephem

$ make MOTIF=../../libXm/linux86

(NOTE : If you’re using an x86_64 system, use MOTIF=/usr/lib as make the option since the libXm delivered with xephem won’t do any good for you)
The rest is as stated in the INSTALL file.