Sample Header Ad - 728x90

Why suddenly apt-get output became colored?

1 vote
0 answers
249 views
I'm trying to get wine. I've been doing instructions from https://wiki.winehq.org/Ubuntu and on sudo apt update I've seen "E: The repository 'cdrom ..." with red "E". Just several minutes before in output of sudo apt update it was ordinary white same as the rest of output. Between "normal" and red the only commands I did were downloading w/out install sudo apt-get install -d somepackage and ones from the wine page. I wanted to revisit/recheck what I've done and now only after history and cat /etc/apt/sources.list.d/winehq-jammy.sources output of sudo apt update is all white again. Any idea what happened? What caused the colored output to apprear? I'm wary of glitches in the system I use, I want to find out the cause. Web search for colored output of apt found some solutions involving scripts etc., how adding sources and keys resulted in transient color? TL;DR Links found: https://askubuntu.com/questions/445245/how-do-i-enable-fancy-apt-colours-and-progress-bars https://unix.stackexchange.com/questions/167828/format-terminal-output-to-show-apt-get-upgrade-errors-in-red Terminal contents (actually more commands than I mentioned ealier, still no idea how that resulted in color): 35 sudo apt-get update 36 sudo apt-get install -d somepackage 37 eval $(apt-config shell CACHE Dir::Cache) 38 eval $(apt-config shell ARCHIVES Dir::Cache::archives) 39 # from man bash: 40 # brace { after $ "serve to protect the variable to be expanded from characters immediately following it which could be interpreted as part of the name." 41 debs_cache_folder=/${CACHE}/${ARCHIVES} 42 echo $debs_cache_folder 43 ls echo $debs_cache_folder 44 ls echo $debs_cache_folder | wc 45 sudo apt-get clean ... same install -d / ls wc / clean for several other packages 54 sudo dpkg --add-architecture i386 55 sudo mkdir -pm755 /etc/apt/keyrings 56 sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key 57 sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources 58 sudo apt update 59 history ~/Downloads$ cat /etc/apt/sources.list.d/ cat: /etc/apt/sources.list.d/: Is a directory ~/Downloads$ cat /etc/apt/sources.list.d/ official-package-repositories.list winehq-jammy.sources ~/Downloads$ cat /etc/apt/sources.list.d/winehq-jammy.sources Types: deb URIs: https://dl.winehq.org/wine-builds/ubuntu Suites: jammy Components: main Architectures: amd64 i386 Signed-By: /etc/apt/keyrings/winehq-archive.key
Asked by Martian2020 (1443 rep)
Oct 13, 2023, 12:06 AM