1
vote

In a terminal, if you type apt- and press tab, you will end up with these suggestions:

enter image description here

I'd like to see practical examples of how you would use each these commands.

Note: I already know how to use a few of these, but would like examples of them all for completeness.

13
  • 7
    It might help if you explained why the man pages aren't helping you.
    – Cry Havok
    Mar 25, 2013 at 20:26
  • 2
    @CryHavok, I am looking for an answer that shows me how to use it. Not read what it does. I mean the man pages are good. But I would never understand how apt-mark works unless I am an expert or I have had an instance where I have used it
    – Suhaib
    Mar 25, 2013 at 20:54
  • 2
    See also this related question: what is the use of the various apt commands.
    – user76204
    Mar 25, 2013 at 21:19
  • 3
    Isn't it better to ask for specific examples? This is quite broadly scoped and can turn into a "lists" type of situation. If you have a question about apt-mark, ask it by all means.
    – user25656
    Mar 26, 2013 at 1:27
  • 2
    @vasa1 I don't see how this is different from askubuntu.com/questions/236381/what-is-apparmor The mods even endorsed that one.
    – Seth
    Mar 31, 2013 at 21:51

1 Answer 1

4
votes

It is very easy: you type man apt-cdrom, for instance, and you get more information and an explanation. You can also navigate the documentation here: http://manpages.ubuntu.com/. man stands for manual. The command works for a lot of other terminal commands as well.

You usually get a good description and a synopsis. Sometimes you also get practical examples, but that depends on the man page.

  1. For apt-add-repository it states

      add-apt-repository is a script which adds an external APT repository to
      either  /etc/apt/sources.list  or a file in /etc/apt/sources.list.d/ or
      removes an already existing repository.
    
  2. For apt-get

     apt-get is the command-line tool for handling packages, and may be
     considered the user's "back-end" to other tools using the APT library.
     Several "front-end" interfaces exist, such as dselect(1), aptitude(8),
     synaptic(8) and wajig(1).
    
  3. For apt-key

      apt-key is used to manage the list of keys used by apt to authenticate
      packages. Packages which have been authenticated using these keys will
      be considered trusted.
    

For the rest it is up to you to learn about these commands in the man pages. The synopsis can hardly get any more practical.

5
  • Thank you for the answer, But I know it is time consuming, But Can you show me some practical examples for each one of them ? For the 1st two commands I already know what they do. I was hoping that someone explains the commands with an example. apt-mark can be understood if you know how to mark packages which is considered advanced for a user like me
    – Suhaib
    Mar 25, 2013 at 20:59
  • This just says 'RTFM' to me and does not have the examples the OP is looking for. -1 Mar 25, 2013 at 21:24
  • 2
    @MarkPaskal This is indeed a way of saying RTM [sic]. The manual contains sufficient information for the OP to solve his question. If he wants a tutorial, I personally feel that Ask Ubuntu is not the place. Thanks for you feedback.
    – don.joey
    Mar 26, 2013 at 8:05
  • @MarkPaskal, when you hover the mouse cursor over the upvote area, the tooltip that displays has this, in part: This question shows research effort; Where is the research effort in this question? That's why I suggested in a comment that OP ask a focused question if a specific problem was encountered. Apt is a vast topic and asking to see "some practical examples for each one of them" is not appropriate in my opinion.
    – user25656
    Apr 2, 2013 at 11:01
  • @vasa1 I agree that asking for any information on ten separate commands in one question is inappropriate on AU. I do think asking how apt as a whole works (including how it's plethora of command line programs are relevant to me the user) is ok, however. I don't think the question is so much asking just for examples as it's asking 'What are all these and why/when would I use them? Apr 2, 2013 at 23:44

Not the answer you're looking for? Browse other questions tagged .