1

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.

don.joey
  • 28,662
Suhaib
  • 4,110
  • 7
    It might help if you explained why the man pages aren't helping you. – Cry Havok Mar 25 '13 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 '13 at 20:54
  • 1
    @CryHavok Examples are always useful and help even experts get a better understanding of these commands. – Seth Mar 25 '13 at 21:18
  • 2
    See also this related question: what is the use of the various apt commands. –  Mar 25 '13 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. –  Mar 26 '13 at 01:27
  • 2
    @vasa1 I don't see how this is different from http://askubuntu.com/questions/236381/what-is-apparmor The mods even endorsed that one. – Seth Mar 31 '13 at 21:51
  • @Seth, What the mod "endorses" is one thing. What I interpret from my reading of the FAQ is another thing. It's quite obvious that the two needn't be the same otherwise I could be a mod myself ;) BTW, I had questioned the broadness of that apparmor question in the meta section. If a question such as "what is apparmor" isn't too broadly scoped I don't know what is. –  Apr 01 '13 at 02:18
  • 1
    I might be echoing somebody else but before you know "how to use it" surely you should know "if you should use it". I'm struggling to find the value in a question with many answers that just rephrase man pages. – Oli Apr 03 '13 at 01:25
  • @Seth I like the other question but I'm not keen on this... Mostly because this feel like "What is every command in /usr/bin and what do they do?" AppArmour is a much larger and more mysterious beast. – Oli Apr 03 '13 at 01:27
  • @Oli I'm going to attempt an answer. I'll see if I can get it done quickly. – Seth Apr 03 '13 at 01:30
  • 1
    @Seth (et al): I may take an axe to this in the morning so please consider this post and comment on it if you care to http://meta.askubuntu.com/questions/6431/what-makes-a-question-too-broadly-scoped-for-askubuntu/6434#6434 – Oli Apr 03 '13 at 01:42
  • You will find what you need here- https://help.ubuntu.com/community/AptGet/Howto – Gaurav Saxena Apr 03 '13 at 01:49
  • I really dont understand, what is the problem. Something is not working well? – Dee Apr 03 '13 at 09:01

1 Answers1

4

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.

don.joey
  • 28,662
  • 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 '13 at 20:59
  • This just says 'RTFM' to me and does not have the examples the OP is looking for. -1 – Mark Paskal Mar 25 '13 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 '13 at 08: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. –  Apr 02 '13 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? – Mark Paskal Apr 02 '13 at 23:44