Which sequence of command do i need to input to close ROOT?
If you mean, how do you run a macro and close ROOT afterwards, use
root -q macro.C
If you mean, how do I quit the interpreter, use .q.
This page discusses interactive sessions for the older CINT interpreter, but I believe the information about .q[qqqqqq] still hold true:
Quit: q : quit cint
qqq : quit cint - mandatory
qqqqq : exit process immediately
qqqqqqq : abort process