Ceci est une ancienne révision du document !
Chapter 2 of my LPIC-1 study book deals with managing software. More specifically, with package management, managing shared libraries, and managing processes. My coverage here of chapter 2 content will be limited to a brief treatment of package management, as I am already after only one month of studying, lagging well behind. Hofstadter's Law comes to mind as I write. The law states, and please excuse my paraphrasing, that everything takes longer than expected, even when you account for Hofstadter's Law.
For Exam 101 of LPIC-1, you must be familiar with both RedHat and Debian package management, as well as knowing how to convert between the two. Ubuntu, as it's Debian-based, uses dpkg, the apt command suite or Synaptic. I shan't bore you with the details, but essentially one needs to learn many of the common package management command options by heart. For example, the difference between dpkg -r (–remove) and dpkg -p (–purge). dpkg -p removes both package and configuration files while dpkg -r removes the package files but leaves the configuration files intact.
Learning for Exam 101
I cannot stress enough how specific one's knowledge must be for this exam, and this is responsible for my slow progress, in part at least. I don't use Ubuntu, or any distribution, in my daily work, where I could practice and apply my Linux knowledge. Furthermore, my personal needs don't require me to address many of the higher-level functions needed for Exam 101. Hence, I have produced sets of flashcards and learn by rote. The flashcards are effective, but they take some time to produce. Yet repeatedly transferring information from text books to flashcards is mind-numbing at best.
There are test questions at the end of the book chapters, but not enough to point out knowledge gaps and foster learning.
My style of learning throws up a few oddities. A case in point, I've learned that the main two user configuration files are located at ~/.bashrc and ~/.profile (global configuration files are located elsewhere). I don't know how to interpret the contents of the files nor what to do with them, but I do know where they're located. Having said that, one general feeling has stuck with me, which is a sense of awe at the complexity of this operating system: whatever you may want to alter, it can be done.
Some commands, however, have proven to be very useful. For example, coding errors often refer to a line number. A simple cat -n file.txt > file_lines.txt will produce file_lines.txt with line numbers (blank lines also numbered). Alternatively, with a short piece of code, one could print directly to the screen with:
cat -n file.txt.
I've also found some pieces of knowledge that have been conceptually very helpful. For instance, ever wondered why commands in man pages are numbered? The top left corner of all man pages, shows the command to which the man page refers (e.g. passwd) and a number (e.g. passwd[1]). At the bottom of the man page, you can sometimes see the command together with more numbers (e.g. passwd[5]). This number refers to the man section in which the command is to be found. passwd[1] is a shell command and passwd[5] is a file format: sections 1 and 5 of the man page categorization are 'bash and shell commands' and 'file formats', respectively. By default, the man command takes the lowest number categorisation. If you want to access the man page for passwd that relates to file formats, type:
man 5 passwd.
In short, I've still got a way to go, but I'm integrating this knowledge into my daily usage. I need to find more resources though.