You can escape inside a listing. I defined a command that brings you in a new line without adding root@ubuntu:~#
. (I could only run the code after Tiuri's edit.)
\documentclass[]{article}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{tcolorbox,url}
\tcbuselibrary{skins,xparse,listings}
\begin{document}
\newtcblisting{ubuntu}{colback=violet!50!black,
colupper=white,colframe=gray!65!black,listing only,
listing options={style=tcblatex,language=sh,escapeinside=||,},
title={\textcolor{orange}{\Huge{$\bullet$}}{\textcolor{gray}{\Huge{$\bullet\bullet$}}}},
every listing line={\textcolor{lime}{\small\ttfamily\bfseries root@ubuntu{\textcolor{white}:}\textcolor{cyan!60}{\url{~}}{\textcolor{white}\#} }}}
\newlength{\Lind}
\setbox0\hbox{\small\ttfamily\bfseries root@}
\setlength{\Lind}{\the\dimexpr\wd0+1pt}
\newcommand{\LR}{\\\hspace*{-\Lind}}
\begin{ubuntu}
whoami |\LR| root
id |\LR| uid=0(root) gid=0(root) groups=0(root)
hostname |\LR| ubuntu
_
\end{ubuntu}
\end{document}

ADDENDUM/IMPROVEMENT. After answering this follow-up question I feel that the above is unnecessarily complicated. One can just define a command, \StartConsole
, that removes the prompt, and a command \SU
that installs a certain prompt. This command can be used e.g. as in
\SU{user=bob,host=remotehost,color=cyan}
which changes the prompt to
bob@remotehost:~#
Even better, one can install styles for users. For instance,
\pgfkeys{/ubuntu/.cd,bob/.style={user=bob,host=remotehost,color=cyan}}
followed by
\SU{bob}
will achieve the same.
\documentclass[]{article}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{tcolorbox,url}
\tcbuselibrary{skins,xparse,listings}
\begin{document}
\newtcblisting{ubuntu}{colback=violet!50!black,
colupper=white,colframe=gray!65!black,listing only,
listing options={style=tcblatex,language=sh,escapeinside=``,},
title={\textcolor{orange}{\Huge{$\bullet$}}{\textcolor{gray}{\Huge{$\bullet\bullet$}}}},
every listing line={\MyUbuntuPrompt}}
\pgfkeys{/ubuntu/.cd,
user/.code={\gdef\MyUbuntuUser{#1}},user={},
host/.code={\gdef\MyUbuntuHost{#1}},host={},
color/.code={\gdef\MyUbuntuColor{#1}},color=white,
prompt char/.code={\gdef\MyUbuntuPromptChar{#1}},prompt char=\#,
root/.style={user=root,host=ubuntu,color=lime,prompt char=\#},
bob/.style={user=bob,host=remotehost,color=cyan},
}
\newcommand{\SU}[1]{\pgfkeys{/ubuntu/.cd,#1}%
\gdef\MyUbuntuPrompt{\textcolor{\MyUbuntuColor}{\small\ttfamily\bfseries \MyUbuntuUser@\MyUbuntuHost{\textcolor{white}:}\textcolor{cyan!60}{\url{~}}{\textcolor{white}\MyUbuntuPromptChar} }}}
\newcommand{\StartConsole}{\gdef\MyUbuntuPrompt{}}
\SU{user=root,host=ubuntu,color=lime}
\begin{ubuntu}
whoami `\StartConsole`
root `\SU{root}`
id `\StartConsole`
uid=0(root) gid=0(root) groups=0(root)`\SU{root}`
hostname `\StartConsole`
ubuntu`\SU{root}`
ssh bob@remotehost`\StartConsole`
bob@remotehost's`\ `password:
Linux remotehost 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686
You have mail.
Last login: Wed Oct 16 01:12:35 2012 from localhost
`\SU{bob}`
whoami`\StartConsole`
bob`\SU{bob}`
_
\end{ubuntu}
\end{document}

User names with special characters also work without problems. The fat underscore is borrowed from this answer.
\documentclass[]{article}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{tcolorbox,url,tikzlings}
\tcbuselibrary{skins,xparse,listings}
\begin{document}
\newtcblisting{ubuntu}{colback=violet!50!black,
colupper=white,colframe=gray!65!black,listing only,
listing options={style=tcblatex,language=sh,escapeinside=``,},
title={\textcolor{orange}{\Huge{$\bullet$}}{\textcolor{gray}{\Huge{$\bullet\bullet$}}}},
every listing line={\MyUbuntuPrompt},enhanced,
overlay={\begin{tcbinvclipframe}
\penguin[shift={([xshift=2cm,yshift=-0.8cm]frame.north)}]
\end{tcbinvclipframe}}}
\pgfkeys{/ubuntu/.cd,
user/.code={\gdef\MyUbuntuUser{#1}},user={},
host/.code={\gdef\MyUbuntuHost{#1}},host={},
color/.code={\gdef\MyUbuntuColor{#1}},color=white,
prompt char/.code={\gdef\MyUbuntuPromptChar{#1}},prompt char=\#,
root/.style={user=root,host=ubuntu,color=lime,prompt char=\#},
bob/.style={user=bob,host=remotehost,color=cyan},
cat/.style={user={schroedingers\char`_cat},host=burrow,color=magenta,prompt char=\$}
}
\newcommand{\SU}[1]{\pgfkeys{/ubuntu/.cd,#1}%
\gdef\MyUbuntuPrompt{\textcolor{\MyUbuntuColor}{\small\ttfamily\bfseries \MyUbuntuUser@\MyUbuntuHost{\textcolor{white}:}\textcolor{cyan!60}{\url{~}}{\textcolor{white}\MyUbuntuPromptChar} }}}
\newcommand{\StartConsole}{\gdef\MyUbuntuPrompt{}}
\SU{user=root,host=ubuntu,color=lime}
\begin{ubuntu}
whoami `\StartConsole`
root `\SU{root}`
id `\StartConsole`
uid=0(root) gid=0(root) groups=0(root)`\SU{root}`
hostname `\StartConsole`
ubuntu`\SU{root}`
ssh cat@burrow`\StartConsole`
bob@remotehost's`\ `password:
Linux remotehost 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686
You have mail.
Last login: Wed Oct 16 01:12:35 2012 from localhost
`\SU{cat}`
whoami`\StartConsole`
schroedingers_cat`\SU{cat}`
_
\end{ubuntu}
\end{document}

The penguin must have seen the many occurrences of the word "Ubuntu" here.