0

New to Linux. I'm using:

uname -r
5.15.0-30-generic
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:    22.04
Codename:   jammy

First I was trying to increase tty fonts, have edit the file: .bashrc Used suggestion given in: https://unix.stackexchange.com/questions/49779/can-i-change-the-font-of-the-text-mode-console sudo nano .bashrc; to end added this lines:

# Set font when running in console
/bin/setfont /usr/share/consolefonts/Lat2-Terminus32x16.psf.gz

Splash Calendar and time

now

ASCII Linux distribution display

screenfetch

Started to get errors when starting terminal like: Couldn't get a file descriptor referring to the console Removed this 3 lines again so I get the original .bashrc file

Now error "Couldn't get a file descriptor referring to the console" no longer happened but still I got error when go the the root

sudo -s
Command 'now' not found, did you mean:
  command 'nsw' from snap nsw (0+git.b61ddec)
  command 'nop' from deb graphviz (2.42.2-6)
  command 'new' from deb mmh (0.4-4)
  command 'new' from deb nmh (1.7.1-11)
  command 'nox' from deb nox (2022.1.7-1)
  command 'sow' from deb ruby-hoe (3.22.1+dfsg1-2)
  command 'cow' from deb fl-cow (0.6-4.2)
  command 'nw' from deb netrw (1.3.2-3)
See 'snap info <snapname>' for additional versions.
Command 'screenfetch' not found, but can be installed with:
apt install screenfetch

Any help?

zf73
  • 3
  • 1
    You've altered your login script to include commands now and screenfetch which are not included by default; thus adding them was in error, unless you plan on installing those packages. The answer where you got the now from was a different release and isn't included by default on any system that I recall (it's been a awhile since I used 16.04 but I doubt it was default there too) Where an answer for a like issue involves a different OS/release to yours; validate/check/adjust where necessary for your OS/release. FYI: I think the now & screenfetch where used as example in answer – guiverc May 19 '22 at 01:22
  • Here is the now script: https://askubuntu.com/questions/1020692/terminal-splash-screen-with-weather-calendar-time-sysinfo and screenfetch is installed separately. – Terrance May 19 '22 at 03:10
  • Please be carefull, and correct this command sudo nano bashr.rs. – vanadium May 19 '22 at 09:24

1 Answers1

0

This sounds as if you changed the .bashrc of the root user rather than that file of your current user. Open that file:

sudoedit /root/.bashrc

and remove the three lines you still see there.

Explanation: using sudo changes to a shell for the root user. Hence, the shell initialization file of the root user are read and interpreted before displaying the prompt. When using bash, the initialization file for an interactive terminal is .bashrc, thus /root/.bashrc for root user.

vanadium
  • 88,010