Are you talking about using an alias for "shutdown -r now?"
Code:
alias new_command_name='restart X'
Note that is just an example. Please let me know if that is what you are looking for, unless you are trying to do something else. What exactly are you trying to do, anyway?
Cheers,
Josh