Note that on modern Debian systems, aptitude is preferable to apt-get because it has better dependency resolution etc:
aptitude update && aptitude safe-upgrade
You can also run aptitude without any arguments which starts a nice text UI: aptitude
If you want to do it all on one line, "apt-get update && apt-get upgrade" is the answer.
The && means "run the second command only if the first command completes without an error" .