1

When issuing: sudo apt-get update & sudo apt-get upgrade -y

The console returns:

[1] 3854

And starts the procedure, but stalls after:

Reading package lists... Done

When trying from different SSH sessions the [X] YYYY is different. Reboot doesn’t fix the issue.

Does the [X] YYYY refer to a lock from a previous update?

2
  • 1
    Welcome to Ask Ubuntu! Did you issue sudo apt-get update & sudo apt-get upgrade -y literally? The ampersand should be doubled (&&) to do what you probably wanted. Instead, you seem to have got a task in background.
    – Melebius
    Aug 13, 2018 at 8:07
  • yes, the single & seemed to be the reason to my struggles - I have been searching for many things, not realizing that my problem was something completely different.
    – user859521
    Aug 13, 2018 at 10:16

1 Answer 1

2

The & operator is specially used for executing a task in background, representing like you see (with the [X] YYYY). YYYY is the PID number of the task in background, and X is the number you assigned at this background task (like a counter).

PID will change every time, it will increment itself like a counter, and X would be reset when you will close the terminal. If you type kill -9 YYYY where YYYY is the PID number of this background task; terminal will prompted [X] Stopped, that means your background task is ... stopped.

There is no problem with that, just a little mistake from your command, which would be sudo apt-get update && sudo apt-get upgrade -y.

NB: Usually, when you use a command line (without the & operator), you can't use another one in the same terminal unless the command line is done, but when you add the & operator, the terminal will accept another command at same time (but without output and error redirection, it can be hard to type something, so you can also use nohup).

2

You must log in to answer this question.