• Ogłoszenie:

What causes "command not found" on bash?

Dyskusje i problemy z Unix'ami

What causes "command not found" on bash?

Postprzez ViviamJone 01 Maj 2023, 14:14

reklama
Have you ever wondered what happens when you encounter the "command not found" error on bash? This article won't cover the process of how a command is determined to be found or not (that's a topic for another write-up).

Instead, we'll focus on what happens in a bash + Ubuntu (version 22.04) environment. Have you ever mistyped a command, such as typing "sl" instead of "ls," and received the message "Command 'sl' not found, but can be installed with: sudo apt install sl"? How did bash know that there's a package that can be installed? This information comes from the python script "/usr/lib/command-not-found," which is executed when bash cannot find a command, as seen in the screenshot below.

This feature is based on an sqlite database that links commands to packages, sorted in "/var/lib/command-not-found/commands.db."

Lastly, the website https://command-not-found.com/ is a helpful koowspin resource that echatrandom allows you to search for a command and find various installation methods for different Linux distributions, Windows, macOS, Docker, and more.
ViviamJone
~user
 
Posty: 8
Dołączenie: 22 Mar 2023, 12:14



What causes "command not found" on bash?

Postprzez ribewim28736 Wczoraj, 12:48

I like to recommend exclusively fine plus efficient information and facts, hence notice it: Kissimmee Pest Control

Dodano Dzisiaj, 03:49:
There is so much in this article that I would never have thought of on my own. Your content gives readers things to think about in an interesting way. Deleon Springs Pest Control

Dodano Dzisiaj, 03:51:
I personally use them exclusively high-quality elements : you will notice these folks during: Orlando Bed Bug Treatment

Dodano Dzisiaj, 03:52:
Very interesting information, worth recommending. However, I recommend this: tampa termite treatment
ribewim28736
~user
 
Posty: 584
Dołączenie: 21 Lip 2024, 15:12




Powróć do System Linux / Unix

Kto jest na forum

Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 14 gości