Lesson one, first and last.
- If you really want to learn, and not just type things in a terminal like cheat codes on a game, try to understand what they do. If not understand, then at least guess. Then ask.
Else, you will be like my younger brother who only knows the "killall firefox-bin" as a "cheatcode" that closes firefox when it's stuck.
- 99% of linux configuration files is plain and simple text, placed in the right order. The text is placed on the right file, the file is placed on the right folder, the application finds it and follows the configuration you want. Simple as 1-2-3.
The file you had to edit was "/etc/apt/sources.list". The same file edited wrong or placed in the wrong location is as useless as a text file saying "jim" 1000 times.
- Since it's plain text, it can be edited with a simple text editor. ANY text editor will do. Gedit was suggested because it comes preinstalled with gnome. It could be anything like nano, geany, vim, kate, leafpad and so on.
The only reason to choose one over the other is what YOU feel comfortable with.
So, in your situation, the task was open "this" file with "that" editor.
- Now that you understand what opens with, you move one step further. Inserting text to them.
That is why bash said "bash: deb: command not found". That line was supposed to be INSIDE the file, not to be run from the terminal.
In order to understand that... read more carefully or ask.
- The rest are stuff that you learn as you raise your experience. For instance, there is a reason I have put ">>" and not ">" there.
The first would append the text, after the echo command, to the requested file. The second one would write the text in the requested file, deleting everything else inside it!
- Moreover, some common sense is required.
E.g. someone thinks "I use a mirror from Italy as my main mirror and I have this line inside my sources.list
Code:
deb ftp://ftp.it.debian.org/debian/ stable main
and Jim suggests adding "contrib" and "non-free" to what I have. Plus he uses a mirror from Germany"
Code:
deb ftp://ftp.de.debian.org/debian/ stable main contrib non-free
The important part is to add "contrib" and "non-free" to what you have. This will get you the "WHAT" part of the stuff you want.
The trivial part is the mirror from which you will get it from. This is the "WHERE FROM" part for the stuff you want.
It is trivial because all mirrors are identical to each other, so you don't really care where you will get what you need, as soon as you get it
- The terminal is by far the shortest way of doing something. Doing it through gui (user interface) would make all of us post directions like "go there, click that menu, from the dropdown list select that" and so on.
If you liked my post, please leave a comment by clicking the scales icon under my name