Reading Linux kernel documentation in terminal












0














Is there a way to read Linux Kernel documentation offline in the terminal? For exmple, I am reading this document online: https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt



If I use Linux system, shouldn't the system already have one document copy. How can I access them in terminal?










share|improve this question




















  • 1




    Linux is not an OS. Gnu/Linux is, but even then there are multiple distributions. So one distribution may have the documents installed by default, another may allow you to install them, and yet a third may provide no mechanism to install them, but you could install them manually in any case.
    – ctrl-alt-delor
    Sep 14 '18 at 19:19
















0














Is there a way to read Linux Kernel documentation offline in the terminal? For exmple, I am reading this document online: https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt



If I use Linux system, shouldn't the system already have one document copy. How can I access them in terminal?










share|improve this question




















  • 1




    Linux is not an OS. Gnu/Linux is, but even then there are multiple distributions. So one distribution may have the documents installed by default, another may allow you to install them, and yet a third may provide no mechanism to install them, but you could install them manually in any case.
    – ctrl-alt-delor
    Sep 14 '18 at 19:19














0












0








0







Is there a way to read Linux Kernel documentation offline in the terminal? For exmple, I am reading this document online: https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt



If I use Linux system, shouldn't the system already have one document copy. How can I access them in terminal?










share|improve this question















Is there a way to read Linux Kernel documentation offline in the terminal? For exmple, I am reading this document online: https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt



If I use Linux system, shouldn't the system already have one document copy. How can I access them in terminal?







linux-kernel documentation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 14 '18 at 18:40

























asked Sep 14 '18 at 15:53









Joe Lu

35




35








  • 1




    Linux is not an OS. Gnu/Linux is, but even then there are multiple distributions. So one distribution may have the documents installed by default, another may allow you to install them, and yet a third may provide no mechanism to install them, but you could install them manually in any case.
    – ctrl-alt-delor
    Sep 14 '18 at 19:19














  • 1




    Linux is not an OS. Gnu/Linux is, but even then there are multiple distributions. So one distribution may have the documents installed by default, another may allow you to install them, and yet a third may provide no mechanism to install them, but you could install them manually in any case.
    – ctrl-alt-delor
    Sep 14 '18 at 19:19








1




1




Linux is not an OS. Gnu/Linux is, but even then there are multiple distributions. So one distribution may have the documents installed by default, another may allow you to install them, and yet a third may provide no mechanism to install them, but you could install them manually in any case.
– ctrl-alt-delor
Sep 14 '18 at 19:19




Linux is not an OS. Gnu/Linux is, but even then there are multiple distributions. So one distribution may have the documents installed by default, another may allow you to install them, and yet a third may provide no mechanism to install them, but you could install them manually in any case.
– ctrl-alt-delor
Sep 14 '18 at 19:19










3 Answers
3






active

oldest

votes


















0














You can use the command curl something like:



curl https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt | less


The command curl can visualize the document cgroups.txt in the same format as in the original webpage. You could pipe the output to the command less to be able to scroll through the text.



enter image description here






share|improve this answer























  • What I want is like: man cgroup.
    – Joe Lu
    Sep 14 '18 at 16:02






  • 1




    Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
    – Joe Lu
    Sep 14 '18 at 18:50










  • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers. (any you won't have to say it twice)
    – ctrl-alt-delor
    Sep 14 '18 at 19:22










  • Dear Joe, according to your question. l understood that you would like to visualize the kernel documents using Terminal. You can run the command curl as I had provided. It will show the document exactly similar to cgroups.txt document and in the same format. Pipe the command to the command less to be able to scroll through the document. Please let me know if this is what you want ;-)
    – user88036
    Sep 14 '18 at 19:28












  • Your distribution (Debian, Ubuntu, Centos) may offer a local copy; please edit your question to include the distribution.
    – Mark Plotnick
    Sep 15 '18 at 7:36



















1














If you have Linux sources downloaded, the same documentation (for the downloaded version) is available in doc/ subfolder.



You can download online files with wget, e.g. wget https://....



A simple way to read text files is to use a pager such as less.






share|improve this answer





















  • Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
    – Joe Lu
    Sep 14 '18 at 18:50










  • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers.
    – ctrl-alt-delor
    Sep 14 '18 at 19:21



















0














This worked for me to view this



https://github.com/torvalds/linux/blob/master/Documentation/sysctl/vm.txt



in the terminal on Debian.



Install kernel specific docs



apt install linux-doc



Locate the file of interest



dpkg -L linux-doc | grep sysctl



View it



less /usr/share/doc/linux-doc/sysctl/vm.txt.gz






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f469080%2freading-linux-kernel-documentation-in-terminal%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can use the command curl something like:



    curl https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt | less


    The command curl can visualize the document cgroups.txt in the same format as in the original webpage. You could pipe the output to the command less to be able to scroll through the text.



    enter image description here






    share|improve this answer























    • What I want is like: man cgroup.
      – Joe Lu
      Sep 14 '18 at 16:02






    • 1




      Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
      – Joe Lu
      Sep 14 '18 at 18:50










    • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers. (any you won't have to say it twice)
      – ctrl-alt-delor
      Sep 14 '18 at 19:22










    • Dear Joe, according to your question. l understood that you would like to visualize the kernel documents using Terminal. You can run the command curl as I had provided. It will show the document exactly similar to cgroups.txt document and in the same format. Pipe the command to the command less to be able to scroll through the document. Please let me know if this is what you want ;-)
      – user88036
      Sep 14 '18 at 19:28












    • Your distribution (Debian, Ubuntu, Centos) may offer a local copy; please edit your question to include the distribution.
      – Mark Plotnick
      Sep 15 '18 at 7:36
















    0














    You can use the command curl something like:



    curl https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt | less


    The command curl can visualize the document cgroups.txt in the same format as in the original webpage. You could pipe the output to the command less to be able to scroll through the text.



    enter image description here






    share|improve this answer























    • What I want is like: man cgroup.
      – Joe Lu
      Sep 14 '18 at 16:02






    • 1




      Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
      – Joe Lu
      Sep 14 '18 at 18:50










    • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers. (any you won't have to say it twice)
      – ctrl-alt-delor
      Sep 14 '18 at 19:22










    • Dear Joe, according to your question. l understood that you would like to visualize the kernel documents using Terminal. You can run the command curl as I had provided. It will show the document exactly similar to cgroups.txt document and in the same format. Pipe the command to the command less to be able to scroll through the document. Please let me know if this is what you want ;-)
      – user88036
      Sep 14 '18 at 19:28












    • Your distribution (Debian, Ubuntu, Centos) may offer a local copy; please edit your question to include the distribution.
      – Mark Plotnick
      Sep 15 '18 at 7:36














    0












    0








    0






    You can use the command curl something like:



    curl https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt | less


    The command curl can visualize the document cgroups.txt in the same format as in the original webpage. You could pipe the output to the command less to be able to scroll through the text.



    enter image description here






    share|improve this answer














    You can use the command curl something like:



    curl https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt | less


    The command curl can visualize the document cgroups.txt in the same format as in the original webpage. You could pipe the output to the command less to be able to scroll through the text.



    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Sep 14 '18 at 19:29

























    answered Sep 14 '18 at 15:59







    user88036



















    • What I want is like: man cgroup.
      – Joe Lu
      Sep 14 '18 at 16:02






    • 1




      Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
      – Joe Lu
      Sep 14 '18 at 18:50










    • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers. (any you won't have to say it twice)
      – ctrl-alt-delor
      Sep 14 '18 at 19:22










    • Dear Joe, according to your question. l understood that you would like to visualize the kernel documents using Terminal. You can run the command curl as I had provided. It will show the document exactly similar to cgroups.txt document and in the same format. Pipe the command to the command less to be able to scroll through the document. Please let me know if this is what you want ;-)
      – user88036
      Sep 14 '18 at 19:28












    • Your distribution (Debian, Ubuntu, Centos) may offer a local copy; please edit your question to include the distribution.
      – Mark Plotnick
      Sep 15 '18 at 7:36


















    • What I want is like: man cgroup.
      – Joe Lu
      Sep 14 '18 at 16:02






    • 1




      Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
      – Joe Lu
      Sep 14 '18 at 18:50










    • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers. (any you won't have to say it twice)
      – ctrl-alt-delor
      Sep 14 '18 at 19:22










    • Dear Joe, according to your question. l understood that you would like to visualize the kernel documents using Terminal. You can run the command curl as I had provided. It will show the document exactly similar to cgroups.txt document and in the same format. Pipe the command to the command less to be able to scroll through the document. Please let me know if this is what you want ;-)
      – user88036
      Sep 14 '18 at 19:28












    • Your distribution (Debian, Ubuntu, Centos) may offer a local copy; please edit your question to include the distribution.
      – Mark Plotnick
      Sep 15 '18 at 7:36
















    What I want is like: man cgroup.
    – Joe Lu
    Sep 14 '18 at 16:02




    What I want is like: man cgroup.
    – Joe Lu
    Sep 14 '18 at 16:02




    1




    1




    Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
    – Joe Lu
    Sep 14 '18 at 18:50




    Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
    – Joe Lu
    Sep 14 '18 at 18:50












    Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers. (any you won't have to say it twice)
    – ctrl-alt-delor
    Sep 14 '18 at 19:22




    Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers. (any you won't have to say it twice)
    – ctrl-alt-delor
    Sep 14 '18 at 19:22












    Dear Joe, according to your question. l understood that you would like to visualize the kernel documents using Terminal. You can run the command curl as I had provided. It will show the document exactly similar to cgroups.txt document and in the same format. Pipe the command to the command less to be able to scroll through the document. Please let me know if this is what you want ;-)
    – user88036
    Sep 14 '18 at 19:28






    Dear Joe, according to your question. l understood that you would like to visualize the kernel documents using Terminal. You can run the command curl as I had provided. It will show the document exactly similar to cgroups.txt document and in the same format. Pipe the command to the command less to be able to scroll through the document. Please let me know if this is what you want ;-)
    – user88036
    Sep 14 '18 at 19:28














    Your distribution (Debian, Ubuntu, Centos) may offer a local copy; please edit your question to include the distribution.
    – Mark Plotnick
    Sep 15 '18 at 7:36




    Your distribution (Debian, Ubuntu, Centos) may offer a local copy; please edit your question to include the distribution.
    – Mark Plotnick
    Sep 15 '18 at 7:36













    1














    If you have Linux sources downloaded, the same documentation (for the downloaded version) is available in doc/ subfolder.



    You can download online files with wget, e.g. wget https://....



    A simple way to read text files is to use a pager such as less.






    share|improve this answer





















    • Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
      – Joe Lu
      Sep 14 '18 at 18:50










    • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers.
      – ctrl-alt-delor
      Sep 14 '18 at 19:21
















    1














    If you have Linux sources downloaded, the same documentation (for the downloaded version) is available in doc/ subfolder.



    You can download online files with wget, e.g. wget https://....



    A simple way to read text files is to use a pager such as less.






    share|improve this answer





















    • Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
      – Joe Lu
      Sep 14 '18 at 18:50










    • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers.
      – ctrl-alt-delor
      Sep 14 '18 at 19:21














    1












    1








    1






    If you have Linux sources downloaded, the same documentation (for the downloaded version) is available in doc/ subfolder.



    You can download online files with wget, e.g. wget https://....



    A simple way to read text files is to use a pager such as less.






    share|improve this answer












    If you have Linux sources downloaded, the same documentation (for the downloaded version) is available in doc/ subfolder.



    You can download online files with wget, e.g. wget https://....



    A simple way to read text files is to use a pager such as less.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Sep 14 '18 at 16:11









    sebasth

    8,16832046




    8,16832046












    • Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
      – Joe Lu
      Sep 14 '18 at 18:50










    • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers.
      – ctrl-alt-delor
      Sep 14 '18 at 19:21


















    • Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
      – Joe Lu
      Sep 14 '18 at 18:50










    • Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers.
      – ctrl-alt-delor
      Sep 14 '18 at 19:21
















    Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
    – Joe Lu
    Sep 14 '18 at 18:50




    Sorry I didn't express my idea clearly. I updated the problem. Does the kernel document have one copy local? If so, how to access the documents like man cgroup?
    – Joe Lu
    Sep 14 '18 at 18:50












    Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers.
    – ctrl-alt-delor
    Sep 14 '18 at 19:21




    Welcome to the site. Can you please amend question, by amending question. Having to read all comments, to understand the question, will result in misunderstandings, reduce quality of answers, and delay answers.
    – ctrl-alt-delor
    Sep 14 '18 at 19:21











    0














    This worked for me to view this



    https://github.com/torvalds/linux/blob/master/Documentation/sysctl/vm.txt



    in the terminal on Debian.



    Install kernel specific docs



    apt install linux-doc



    Locate the file of interest



    dpkg -L linux-doc | grep sysctl



    View it



    less /usr/share/doc/linux-doc/sysctl/vm.txt.gz






    share|improve this answer


























      0














      This worked for me to view this



      https://github.com/torvalds/linux/blob/master/Documentation/sysctl/vm.txt



      in the terminal on Debian.



      Install kernel specific docs



      apt install linux-doc



      Locate the file of interest



      dpkg -L linux-doc | grep sysctl



      View it



      less /usr/share/doc/linux-doc/sysctl/vm.txt.gz






      share|improve this answer
























        0












        0








        0






        This worked for me to view this



        https://github.com/torvalds/linux/blob/master/Documentation/sysctl/vm.txt



        in the terminal on Debian.



        Install kernel specific docs



        apt install linux-doc



        Locate the file of interest



        dpkg -L linux-doc | grep sysctl



        View it



        less /usr/share/doc/linux-doc/sysctl/vm.txt.gz






        share|improve this answer












        This worked for me to view this



        https://github.com/torvalds/linux/blob/master/Documentation/sysctl/vm.txt



        in the terminal on Debian.



        Install kernel specific docs



        apt install linux-doc



        Locate the file of interest



        dpkg -L linux-doc | grep sysctl



        View it



        less /usr/share/doc/linux-doc/sysctl/vm.txt.gz







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 21 '18 at 17:31









        michfuer

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f469080%2freading-linux-kernel-documentation-in-terminal%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Morgemoulin

            Scott Moir

            Souastre