Shell Modes

M-x shell Shell mode, use M-p and M-n for command history
M-x eshell Cross-platform Emacs Lisp shell emulator, use arrow keys for command history
M-x ansi-term Full terminal emulator, suitable for full-screen applications.