6

This is part of the screen info when I open terminal of wsl2.

As the time indicates it is 23 days before.

How to refresh this info?

  System information as of Sat Jul 30 22:52:35 CST 2022

  System load:                      0.107421875
  Usage of /:                       90.7% of 250.98GB
  Memory usage:                     10%
  Swap usage:                       0%
  Processes:                        44
  Users logged in:                  0
  IPv4 address for br-345a7fa3f56b: 172.18.0.1
  IPv4 address for docker0:         172.17.0.1
  IPv4 address for eth0:            172.31.228.161
1
  • When was the last time you restarted? What is the host time/date? Commented Aug 23, 2022 at 4:30

1 Answer 1

5

Related to my answer on Ask Ubuntu in more ways than one:

  • First, it goes to show how little attention I pay (or most users pay) to the MOTD. Most people seem to catch the Permission denied message (which I assume you are seeing as well), but I never noticed (and no one has brought it up until now) that the System Information is also static.

  • Second, this also comes from the same package mentioned in that answer, and has the same root cause for the issue. The Landscape feature that displays it is for managing Ubuntu servers. It's unintentionally (but erroneously) includes in the WSL Ubuntu 22.04 distribution because it is based on Ubuntu Server.

    Ultimately, it does update because Landscape uses Systemd, which isn't running by default (or easily) on WSL.

If you want to update it, you could run sudo update-motd. Then rm ~/.motd_shown and restart to see the updated info. This command (with the sudo) could also be added to a "boot command" in the /etc/wsl.conf under Windows 11 if you really wanted to update it each time WSL starts. See here for details. There's also a fallback method for Windows 10.

However, the better solution is simply to remove Landscape, since it requires Systemd and is not useful on WSL anyway:

sudo apt remove landscape-common
sudo apt autoremove # Optionally, but recommended
rm ~/.motd_shown
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .