Xanax may be taken with or without food. Avoid operating machinery, driving, or performing tasks that require mental alertness while taking Xanax. Avoid alcohol while taking this medicine. The lowest effective dose of Xanax should be used for the shortest time possible.