mkfs.ext4 command not found in Debian (Jessie)












6















I have just installed Debian 8.4 (Jessie, MATE desktop). For some reason the following command is not recognized:



mkfs.ext4 -L hdd_misha /dev/sdb1


The error I get:



bash: mkfs.ext4: command not found


I have googled and I actually can't seen to find Debian-specific instructions on how to create an ext4 filesystem. Any help much appreciated!










share|improve this question


















  • 1





    do you have /sbin in your path? are you running this as a normal user or as root? unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.

    – cas
    Apr 23 '16 at 5:04


















6















I have just installed Debian 8.4 (Jessie, MATE desktop). For some reason the following command is not recognized:



mkfs.ext4 -L hdd_misha /dev/sdb1


The error I get:



bash: mkfs.ext4: command not found


I have googled and I actually can't seen to find Debian-specific instructions on how to create an ext4 filesystem. Any help much appreciated!










share|improve this question


















  • 1





    do you have /sbin in your path? are you running this as a normal user or as root? unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.

    – cas
    Apr 23 '16 at 5:04
















6












6








6








I have just installed Debian 8.4 (Jessie, MATE desktop). For some reason the following command is not recognized:



mkfs.ext4 -L hdd_misha /dev/sdb1


The error I get:



bash: mkfs.ext4: command not found


I have googled and I actually can't seen to find Debian-specific instructions on how to create an ext4 filesystem. Any help much appreciated!










share|improve this question














I have just installed Debian 8.4 (Jessie, MATE desktop). For some reason the following command is not recognized:



mkfs.ext4 -L hdd_misha /dev/sdb1


The error I get:



bash: mkfs.ext4: command not found


I have googled and I actually can't seen to find Debian-specific instructions on how to create an ext4 filesystem. Any help much appreciated!







debian ext4 mkfs






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 23 '16 at 4:54









misha256misha256

2071212




2071212








  • 1





    do you have /sbin in your path? are you running this as a normal user or as root? unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.

    – cas
    Apr 23 '16 at 5:04
















  • 1





    do you have /sbin in your path? are you running this as a normal user or as root? unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.

    – cas
    Apr 23 '16 at 5:04










1




1





do you have /sbin in your path? are you running this as a normal user or as root? unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.

– cas
Apr 23 '16 at 5:04







do you have /sbin in your path? are you running this as a normal user or as root? unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.

– cas
Apr 23 '16 at 5:04












2 Answers
2






active

oldest

votes


















12














Do you have /sbin in your path?



Most likely you are trying to run mkfs.ext4 as a normal user.



Unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.



Try running it from a root shell (e.g. after sudo -i) or as:



sudo mkfs.ext4 -L hdd_misha /dev/sdb1


BTW, normal users usually don't have the necessary permissions to use mkfsto format a partition (although they can format a disk-image file that they own - e.g. for use with FUSE or in a VM with, say, VirtualBox).



Formatting a partition requires root privs unless someone has seriously messed up the block device permissions in /dev.






share|improve this answer


























  • Perfect answer, thank you. I'm learning :-)

    – misha256
    Apr 23 '16 at 5:14



















0














On some very slimmed down distributions (e.g. Ubuntu Server) it's possible that you don't have mkfs installed. In which case, you can install it with:



sudo apt-get install dosfstools


You may also want ntfsprogs for mkfs.ntfs.



(The package name should be the same in other distros e.g pacman -S dosfstools)






share|improve this answer








New contributor




Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    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%2f278522%2fmkfs-ext4-command-not-found-in-debian-jessie%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    12














    Do you have /sbin in your path?



    Most likely you are trying to run mkfs.ext4 as a normal user.



    Unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.



    Try running it from a root shell (e.g. after sudo -i) or as:



    sudo mkfs.ext4 -L hdd_misha /dev/sdb1


    BTW, normal users usually don't have the necessary permissions to use mkfsto format a partition (although they can format a disk-image file that they own - e.g. for use with FUSE or in a VM with, say, VirtualBox).



    Formatting a partition requires root privs unless someone has seriously messed up the block device permissions in /dev.






    share|improve this answer


























    • Perfect answer, thank you. I'm learning :-)

      – misha256
      Apr 23 '16 at 5:14
















    12














    Do you have /sbin in your path?



    Most likely you are trying to run mkfs.ext4 as a normal user.



    Unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.



    Try running it from a root shell (e.g. after sudo -i) or as:



    sudo mkfs.ext4 -L hdd_misha /dev/sdb1


    BTW, normal users usually don't have the necessary permissions to use mkfsto format a partition (although they can format a disk-image file that they own - e.g. for use with FUSE or in a VM with, say, VirtualBox).



    Formatting a partition requires root privs unless someone has seriously messed up the block device permissions in /dev.






    share|improve this answer


























    • Perfect answer, thank you. I'm learning :-)

      – misha256
      Apr 23 '16 at 5:14














    12












    12








    12







    Do you have /sbin in your path?



    Most likely you are trying to run mkfs.ext4 as a normal user.



    Unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.



    Try running it from a root shell (e.g. after sudo -i) or as:



    sudo mkfs.ext4 -L hdd_misha /dev/sdb1


    BTW, normal users usually don't have the necessary permissions to use mkfsto format a partition (although they can format a disk-image file that they own - e.g. for use with FUSE or in a VM with, say, VirtualBox).



    Formatting a partition requires root privs unless someone has seriously messed up the block device permissions in /dev.






    share|improve this answer















    Do you have /sbin in your path?



    Most likely you are trying to run mkfs.ext4 as a normal user.



    Unless you've added it yourself (e.g. in ~/.bashrc or /etc/profile etc), root has /sbin and /usr/sbin in $PATH, but normal users don't by default.



    Try running it from a root shell (e.g. after sudo -i) or as:



    sudo mkfs.ext4 -L hdd_misha /dev/sdb1


    BTW, normal users usually don't have the necessary permissions to use mkfsto format a partition (although they can format a disk-image file that they own - e.g. for use with FUSE or in a VM with, say, VirtualBox).



    Formatting a partition requires root privs unless someone has seriously messed up the block device permissions in /dev.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 23 '16 at 5:15

























    answered Apr 23 '16 at 5:10









    cascas

    39.4k455103




    39.4k455103













    • Perfect answer, thank you. I'm learning :-)

      – misha256
      Apr 23 '16 at 5:14



















    • Perfect answer, thank you. I'm learning :-)

      – misha256
      Apr 23 '16 at 5:14

















    Perfect answer, thank you. I'm learning :-)

    – misha256
    Apr 23 '16 at 5:14





    Perfect answer, thank you. I'm learning :-)

    – misha256
    Apr 23 '16 at 5:14













    0














    On some very slimmed down distributions (e.g. Ubuntu Server) it's possible that you don't have mkfs installed. In which case, you can install it with:



    sudo apt-get install dosfstools


    You may also want ntfsprogs for mkfs.ntfs.



    (The package name should be the same in other distros e.g pacman -S dosfstools)






    share|improve this answer








    New contributor




    Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      On some very slimmed down distributions (e.g. Ubuntu Server) it's possible that you don't have mkfs installed. In which case, you can install it with:



      sudo apt-get install dosfstools


      You may also want ntfsprogs for mkfs.ntfs.



      (The package name should be the same in other distros e.g pacman -S dosfstools)






      share|improve this answer








      New contributor




      Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        On some very slimmed down distributions (e.g. Ubuntu Server) it's possible that you don't have mkfs installed. In which case, you can install it with:



        sudo apt-get install dosfstools


        You may also want ntfsprogs for mkfs.ntfs.



        (The package name should be the same in other distros e.g pacman -S dosfstools)






        share|improve this answer








        New contributor




        Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        On some very slimmed down distributions (e.g. Ubuntu Server) it's possible that you don't have mkfs installed. In which case, you can install it with:



        sudo apt-get install dosfstools


        You may also want ntfsprogs for mkfs.ntfs.



        (The package name should be the same in other distros e.g pacman -S dosfstools)







        share|improve this answer








        New contributor




        Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 5 hours ago









        JoshJosh

        101




        101




        New contributor




        Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Josh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f278522%2fmkfs-ext4-command-not-found-in-debian-jessie%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

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt