[NTLUG:Discuss] Command line

Preston Hagar prestonh at gmail.com
Wed Oct 15 15:09:46 CDT 2008


On Wed, Oct 15, 2008 at 11:29 AM, Allen Meyers <chef11994 at sbcglobal.net> wrote:
> Command line for this newbie continues to be an exciting learning curve and I would appreciate insight into a general question and 2 specific questions.

Everyone has to start somewhere, just keep trying.  The first thing to
mention is that when posting to a general Linux list (like NTLUG) it
is often a good idea to specify which distribution you are using
(Ubuntu, Gentoo, Fedora, SuSE, etc.)  Since you mention apt-get, it
should be pretty safe to say you are using a Debian-based disto,
likely Ubuntu (although apt commands are generally the same, I think).

> 1. when one is installing a package is there a facility for each one of those installation command lines to uninstall as well

Yes:

sudo apt-get remove <program_name>

A general tip here would be to read the man page.  Anytime you are
unsure of exactly how to run a command like you need, you can
generally run the command:

man <command_name>

and get the manual page.

In this case, if you run:

man apt-get

you can see the different options (update, upgrade, install, etc.) one
of which is remove which is what you are looking for.  Typically to
exit the man page, you either hit the q key or just scroll to the
bottom.

> 2. Specifically is there an uninstall for sudo apt-get install kubuntu-desktop?
> Ok the logical would be to substitute uninstall for install but scary stuff if you are a newbie.

sudo apt-get remove kubuntu-desktop

> 3. I am faces with an installation that requires a bunch of terminal entries and right off the bat the first line for me is confusion
>
>
> First you need to add the following line to source list file by
> editing the
> /etc/apt/sources.list fileAny help greatly appreciated and if responding to item 3 please consider the challenged source.

Editing files is often a very important and frequently required task
in Linux.  If you are sticking to just the command line, I would
recommending picking an editor you like (either emacs or vi) and
learning it (i.e., google for some tutorials for one of those programs
and follow them).  If you have a GUI installed (i.e., you are running
gnome, kde, xfce, etc.) and want a little bit more "user-friendly"
editor you can try gedit (which is typically installed on Ubuntu).

Most files (although not all) located in the /etc directory are system
configuration files that can only be edited by the system
administrator (root), so you will need to use sudo to edit the file.

For example, if you wanted to use the emacs editor to edit the file,
you would type the following:

sudo emacs /etc/apt/sources.list

This would open the file in the emacs editor.  You could then add the
line that you need to the file then press CTRL+X, CTRL+S to save the
file, then CTRL+X, CTRL+C to close the file.

If you are running a graphical desktop, you might want to try the
following instead:

sudo gedit /etc/apt/sources.list

This time, once you were done editing the file, you can just click on
the disk icon to save it and then File->Quit to close the program.


I hope this helps out.  I would generally say that the most valuable
things for someone learning Linux would be patience, Google, and man
pages.  If you get stuck, see if there is a man page, or try to search
for your problem in Google.  If you still can't seem to figure it out,
post to a mailing list like this one and hopefully someone can help
you find the answer.

Preston



More information about the Discuss mailing list