Oopsie upgrading shell

NVM I GOT IT WORKING, but each time I type a command I have to click enter then Ctrl-D

┌──(kali㉿kali)-[~]
└─$ stty raw 148 ⨯ 1 :gear:

┌──(kali㉿kali)-[~]
└─$ fg⚙
[1] + continued sudo nc -lvnp 33456
reset^Mxterm^M^X^C^C
www-data@oopsie:/$ resetreset^M^F^C^Z^X^Mrest^Mreset^M^Crest
esetrest: command not found
www-data@oopsie:/$ reset
reset: unknown terminal type unknown
Terminal type? xterm^Mxterm

www-data@oopsie:/$ xterm^M^M^Mxterm
Command ‘xterm’ not found, but can be installed with:
apt install xterm
Please ask your administrator.
www-data@oopsie:/$
www-data@oopsie:/$
www-data@oopsie:/$ apt install xterm^Mapt install xterm
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
www-data@oopsie:/$ sudo apt install xterm^M^Xsudo apt install xterm
[sudo] password for www-data:

But now I don’t know the password, also it’s weird that xterm isn’t installed.