55
6
I'm using a Ubuntu Linux system, and every command I enter is displayed on the next line, followed by the output of the command. For example:
root@dpkube165:~# ls
ls <--- why is this here?
Desktop Documents Downloads
root@dpkube165:~# date
date <--- or this?
Mon Mar 19 11:24:59 EDT 2018
root@dpkube165:~# echo "Hello, world!"
echo "Hello, world!" <--- or this?
Hello, world!
I thought it might have to do with the prompt, which is as follows (PS1):
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
but reviewing online guides to prompt escape sequences didn't turn up anything obvious.
20You also appear to be logged in as root. Don't do that! – Toby Speight – 2018-03-20T13:42:58.020
5Yes, I know to avoid root most of the time. This is on a VM in a throwaway testing environment where root is required. – Chad – 2018-03-20T19:16:34.317
9@TobySpeight this is hackneyed, rote advice. – rackandboneman – 2018-03-21T11:17:45.530
2@TobySpeight Seriously, don't push that as an absolute rule. Tell me, what's wrong with using
sudo -i
to run a series of root-level commands? Especially when I'm debugging something? – Duncan X Simpson – 2018-03-21T21:06:16.250I didn't expect to have to explain something that obvious to users of [unix.se]! I thought everybody understood the general advice to use the root account for things that require the privilege, and ordinary user accounts for things that don't. If not, there's plenty of other resources to learn from, and I don't have the time for that kind of spoonfeeding right now. – Toby Speight – 2018-03-22T08:25:19.100
2@TobySpeight if you don’t have time to explain, don’t give blanket “advice” which is often unhelpful. – Tim – 2018-03-22T09:11:29.583
@Tim, the advice was given, understood and acknowledged - what's the problem? – Toby Speight – 2018-03-22T11:07:47.730