One-liner to generate an easily memorable password?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












What's a good one-liner to generate an easily memorable password, like xkcd's correct horse battery staple or a Bitcoin seed?



EDIT:
This is not the same as generating a random string since random strings are not at all memorable. Compare to the obligatory xkcd...










share|improve this question









New contributor




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



















  • Possible duplicate of How to generate a random string?
    – Panki
    4 hours ago










  • Read this: eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
    – glenn jackman
    4 hours ago










  • Don't think it's a duplicate of unix.stackexchange.com/questions/230673/… as only one of those comes even close to the requested "memorable phrase" in this question.
    – Jeff Schaller
    2 hours ago














up vote
4
down vote

favorite












What's a good one-liner to generate an easily memorable password, like xkcd's correct horse battery staple or a Bitcoin seed?



EDIT:
This is not the same as generating a random string since random strings are not at all memorable. Compare to the obligatory xkcd...










share|improve this question









New contributor




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



















  • Possible duplicate of How to generate a random string?
    – Panki
    4 hours ago










  • Read this: eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
    – glenn jackman
    4 hours ago










  • Don't think it's a duplicate of unix.stackexchange.com/questions/230673/… as only one of those comes even close to the requested "memorable phrase" in this question.
    – Jeff Schaller
    2 hours ago












up vote
4
down vote

favorite









up vote
4
down vote

favorite











What's a good one-liner to generate an easily memorable password, like xkcd's correct horse battery staple or a Bitcoin seed?



EDIT:
This is not the same as generating a random string since random strings are not at all memorable. Compare to the obligatory xkcd...










share|improve this question









New contributor




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











What's a good one-liner to generate an easily memorable password, like xkcd's correct horse battery staple or a Bitcoin seed?



EDIT:
This is not the same as generating a random string since random strings are not at all memorable. Compare to the obligatory xkcd...







shell-script shell scripting password






share|improve this question









New contributor




moblie 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 question









New contributor




moblie 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 question




share|improve this question








edited 4 hours ago









Jeff Schaller

32.6k849110




32.6k849110






New contributor




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









asked 4 hours ago









moblie

212




212




New contributor




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





New contributor





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






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











  • Possible duplicate of How to generate a random string?
    – Panki
    4 hours ago










  • Read this: eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
    – glenn jackman
    4 hours ago










  • Don't think it's a duplicate of unix.stackexchange.com/questions/230673/… as only one of those comes even close to the requested "memorable phrase" in this question.
    – Jeff Schaller
    2 hours ago
















  • Possible duplicate of How to generate a random string?
    – Panki
    4 hours ago










  • Read this: eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
    – glenn jackman
    4 hours ago










  • Don't think it's a duplicate of unix.stackexchange.com/questions/230673/… as only one of those comes even close to the requested "memorable phrase" in this question.
    – Jeff Schaller
    2 hours ago















Possible duplicate of How to generate a random string?
– Panki
4 hours ago




Possible duplicate of How to generate a random string?
– Panki
4 hours ago












Read this: eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
– glenn jackman
4 hours ago




Read this: eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
– glenn jackman
4 hours ago












Don't think it's a duplicate of unix.stackexchange.com/questions/230673/… as only one of those comes even close to the requested "memorable phrase" in this question.
– Jeff Schaller
2 hours ago




Don't think it's a duplicate of unix.stackexchange.com/questions/230673/… as only one of those comes even close to the requested "memorable phrase" in this question.
– Jeff Schaller
2 hours ago










4 Answers
4






active

oldest

votes

















up vote
2
down vote













Try this,



shuf -n5 /usr/share/dict/words | sed 's/[^[:alnum:]]//g' | paste -sd_


Output:



Quayles_knockwursts_scrotums_Barrie_hauler


Explanation:




  • shuf -n5 /usr/share/dict/words Get 5 random words from dict file


  • sed 's/[^[:alnum:]]//g' Remove non-alphanumeric characters


  • paste -sd_, join the words with underscore (_)





share|improve this answer




















  • It's very likely /usr/share/dict/words doesn't exist on your system and some dictionary needs to be installed first.
    – meeDamian
    53 mins ago

















up vote
2
down vote













You need a wordlist dictionary, since you mention bitcoin, most likely you want this one:



https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt



If your native language is not English, there are wordlists for other languages available in the same repository.



Given this english.txt file, you can do a random selection with shuf:



$ shuf -n 4 english.txt 
anchor
neck
trumpet
response


Note you'll need way more than just 4 words for a truly secure passphrase. 4 words is for an online service where the number of attempts an attacker might do is very limited. I think the bitcoin recommendation is 16 words, not sure.



Also in this example, each word may only appear once. If you wish to allow repeated words, you have to duplicate the wordlist itself:



$ cat english.txt english.txt | shuf -n 4


That would allow each word to appear twice. Of course you can re-create your english.txt to contain each word multiple times in the first place, then go back to the original command.



If you want the output in one line, you can just add xargs echo:



$ shuf -n 4 english.txt | xargs echo
math easily cube daughter



On a sidenote, I don't find this style of password to be easily memorable.



Well, actually I got very lucky with math easily cube daughter since that just happens to make it easy to think of a story where your daughter can easily do math with cubes or whatever. It's something humans can relate to, as is the horse in XKCD's example.



But what the heck is a anchor neck trumpet response? I'm not a comic book author with creativity to spare to come up with a mnemonic for that. So it will be forgotten in no time.



Even if you can remember the words, it's hard to remember their correct order. Was it math easily cube daughter or daugher easily math cube or something else?



And the password is supposed to be random, you're not allowed to pick and modify it.




As for bitcoin seeds, you're not really supposed to remember them. This is just a way to be able to write it down easily. Anyone can write down 16 words on a piece of paper and read them back correctly; with random letters it's much more likely to make mistakes.






share|improve this answer





























    up vote
    1
    down vote













    I have this:



    xkcd_password () 
    command grep "^[[:alpha:]]5,8$" "$1-/usr/share/dict/words"





    share|improve this answer



























      up vote
      0
      down vote













      First of all, install a dictionary of a language you're familiar with, using:



      sudo apt-get install <language-package>


      To see all available packages:



      apt-cache search wordlist | grep ^w


      Note: all installation instructions assume you're on a debian-based OS.



      After you've installed dictionary run:



      WORDS=5; grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words | shuf -n $WORDS | tr 'n' '-' | sed 's/-$//'


      Which will output ex:



      blasphemous-commandos-vasts-suitability-arbor


      To break it down:




      • WORDS=5; - choose how many words you wan in your password


      • grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words - choose only words containing lowercase alphabet characters (it excludes words with ' in them or funky characters like in éclair)


      • shuf -n $WORDS - chose as many WORDS as you've requested


      • tr 'n' '-' - join all words using - (feel free to change it)


      • sed 's/-$//' - remove trailing -

      Alternatively you can wrap it in a function:



      #!/bin/bash

      function memorable_password()
      words="$1:-5"
      sep="$2:--"

      grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words


      or



      #!/bin/sh

      memorable_password() tr 'n' $sep


      Both of which can be called as such:



      memorable_password 7 _
      memorable_password 4
      memorable_password


      Returning:



      skipped_cavity_entertainments_gangway_seaports_spread_communique
      evaporated-clashes-bold-presuming
      excelling-thoughtless-pardonable-promulgated-forbearing


      Hope that helps ^^






      share|improve this answer








      New contributor




      meeDamian 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',
        convertImagesToLinks: false,
        noModals: false,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );






        moblie is a new contributor. Be nice, and check out our Code of Conduct.









         

        draft saved


        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470288%2fone-liner-to-generate-an-easily-memorable-password%23new-answer', 'question_page');

        );

        Post as a guest






























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        2
        down vote













        Try this,



        shuf -n5 /usr/share/dict/words | sed 's/[^[:alnum:]]//g' | paste -sd_


        Output:



        Quayles_knockwursts_scrotums_Barrie_hauler


        Explanation:




        • shuf -n5 /usr/share/dict/words Get 5 random words from dict file


        • sed 's/[^[:alnum:]]//g' Remove non-alphanumeric characters


        • paste -sd_, join the words with underscore (_)





        share|improve this answer




















        • It's very likely /usr/share/dict/words doesn't exist on your system and some dictionary needs to be installed first.
          – meeDamian
          53 mins ago














        up vote
        2
        down vote













        Try this,



        shuf -n5 /usr/share/dict/words | sed 's/[^[:alnum:]]//g' | paste -sd_


        Output:



        Quayles_knockwursts_scrotums_Barrie_hauler


        Explanation:




        • shuf -n5 /usr/share/dict/words Get 5 random words from dict file


        • sed 's/[^[:alnum:]]//g' Remove non-alphanumeric characters


        • paste -sd_, join the words with underscore (_)





        share|improve this answer




















        • It's very likely /usr/share/dict/words doesn't exist on your system and some dictionary needs to be installed first.
          – meeDamian
          53 mins ago












        up vote
        2
        down vote










        up vote
        2
        down vote









        Try this,



        shuf -n5 /usr/share/dict/words | sed 's/[^[:alnum:]]//g' | paste -sd_


        Output:



        Quayles_knockwursts_scrotums_Barrie_hauler


        Explanation:




        • shuf -n5 /usr/share/dict/words Get 5 random words from dict file


        • sed 's/[^[:alnum:]]//g' Remove non-alphanumeric characters


        • paste -sd_, join the words with underscore (_)





        share|improve this answer












        Try this,



        shuf -n5 /usr/share/dict/words | sed 's/[^[:alnum:]]//g' | paste -sd_


        Output:



        Quayles_knockwursts_scrotums_Barrie_hauler


        Explanation:




        • shuf -n5 /usr/share/dict/words Get 5 random words from dict file


        • sed 's/[^[:alnum:]]//g' Remove non-alphanumeric characters


        • paste -sd_, join the words with underscore (_)






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 4 hours ago









        RoVo

        1,481213




        1,481213











        • It's very likely /usr/share/dict/words doesn't exist on your system and some dictionary needs to be installed first.
          – meeDamian
          53 mins ago
















        • It's very likely /usr/share/dict/words doesn't exist on your system and some dictionary needs to be installed first.
          – meeDamian
          53 mins ago















        It's very likely /usr/share/dict/words doesn't exist on your system and some dictionary needs to be installed first.
        – meeDamian
        53 mins ago




        It's very likely /usr/share/dict/words doesn't exist on your system and some dictionary needs to be installed first.
        – meeDamian
        53 mins ago












        up vote
        2
        down vote













        You need a wordlist dictionary, since you mention bitcoin, most likely you want this one:



        https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt



        If your native language is not English, there are wordlists for other languages available in the same repository.



        Given this english.txt file, you can do a random selection with shuf:



        $ shuf -n 4 english.txt 
        anchor
        neck
        trumpet
        response


        Note you'll need way more than just 4 words for a truly secure passphrase. 4 words is for an online service where the number of attempts an attacker might do is very limited. I think the bitcoin recommendation is 16 words, not sure.



        Also in this example, each word may only appear once. If you wish to allow repeated words, you have to duplicate the wordlist itself:



        $ cat english.txt english.txt | shuf -n 4


        That would allow each word to appear twice. Of course you can re-create your english.txt to contain each word multiple times in the first place, then go back to the original command.



        If you want the output in one line, you can just add xargs echo:



        $ shuf -n 4 english.txt | xargs echo
        math easily cube daughter



        On a sidenote, I don't find this style of password to be easily memorable.



        Well, actually I got very lucky with math easily cube daughter since that just happens to make it easy to think of a story where your daughter can easily do math with cubes or whatever. It's something humans can relate to, as is the horse in XKCD's example.



        But what the heck is a anchor neck trumpet response? I'm not a comic book author with creativity to spare to come up with a mnemonic for that. So it will be forgotten in no time.



        Even if you can remember the words, it's hard to remember their correct order. Was it math easily cube daughter or daugher easily math cube or something else?



        And the password is supposed to be random, you're not allowed to pick and modify it.




        As for bitcoin seeds, you're not really supposed to remember them. This is just a way to be able to write it down easily. Anyone can write down 16 words on a piece of paper and read them back correctly; with random letters it's much more likely to make mistakes.






        share|improve this answer


























          up vote
          2
          down vote













          You need a wordlist dictionary, since you mention bitcoin, most likely you want this one:



          https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt



          If your native language is not English, there are wordlists for other languages available in the same repository.



          Given this english.txt file, you can do a random selection with shuf:



          $ shuf -n 4 english.txt 
          anchor
          neck
          trumpet
          response


          Note you'll need way more than just 4 words for a truly secure passphrase. 4 words is for an online service where the number of attempts an attacker might do is very limited. I think the bitcoin recommendation is 16 words, not sure.



          Also in this example, each word may only appear once. If you wish to allow repeated words, you have to duplicate the wordlist itself:



          $ cat english.txt english.txt | shuf -n 4


          That would allow each word to appear twice. Of course you can re-create your english.txt to contain each word multiple times in the first place, then go back to the original command.



          If you want the output in one line, you can just add xargs echo:



          $ shuf -n 4 english.txt | xargs echo
          math easily cube daughter



          On a sidenote, I don't find this style of password to be easily memorable.



          Well, actually I got very lucky with math easily cube daughter since that just happens to make it easy to think of a story where your daughter can easily do math with cubes or whatever. It's something humans can relate to, as is the horse in XKCD's example.



          But what the heck is a anchor neck trumpet response? I'm not a comic book author with creativity to spare to come up with a mnemonic for that. So it will be forgotten in no time.



          Even if you can remember the words, it's hard to remember their correct order. Was it math easily cube daughter or daugher easily math cube or something else?



          And the password is supposed to be random, you're not allowed to pick and modify it.




          As for bitcoin seeds, you're not really supposed to remember them. This is just a way to be able to write it down easily. Anyone can write down 16 words on a piece of paper and read them back correctly; with random letters it's much more likely to make mistakes.






          share|improve this answer
























            up vote
            2
            down vote










            up vote
            2
            down vote









            You need a wordlist dictionary, since you mention bitcoin, most likely you want this one:



            https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt



            If your native language is not English, there are wordlists for other languages available in the same repository.



            Given this english.txt file, you can do a random selection with shuf:



            $ shuf -n 4 english.txt 
            anchor
            neck
            trumpet
            response


            Note you'll need way more than just 4 words for a truly secure passphrase. 4 words is for an online service where the number of attempts an attacker might do is very limited. I think the bitcoin recommendation is 16 words, not sure.



            Also in this example, each word may only appear once. If you wish to allow repeated words, you have to duplicate the wordlist itself:



            $ cat english.txt english.txt | shuf -n 4


            That would allow each word to appear twice. Of course you can re-create your english.txt to contain each word multiple times in the first place, then go back to the original command.



            If you want the output in one line, you can just add xargs echo:



            $ shuf -n 4 english.txt | xargs echo
            math easily cube daughter



            On a sidenote, I don't find this style of password to be easily memorable.



            Well, actually I got very lucky with math easily cube daughter since that just happens to make it easy to think of a story where your daughter can easily do math with cubes or whatever. It's something humans can relate to, as is the horse in XKCD's example.



            But what the heck is a anchor neck trumpet response? I'm not a comic book author with creativity to spare to come up with a mnemonic for that. So it will be forgotten in no time.



            Even if you can remember the words, it's hard to remember their correct order. Was it math easily cube daughter or daugher easily math cube or something else?



            And the password is supposed to be random, you're not allowed to pick and modify it.




            As for bitcoin seeds, you're not really supposed to remember them. This is just a way to be able to write it down easily. Anyone can write down 16 words on a piece of paper and read them back correctly; with random letters it's much more likely to make mistakes.






            share|improve this answer














            You need a wordlist dictionary, since you mention bitcoin, most likely you want this one:



            https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt



            If your native language is not English, there are wordlists for other languages available in the same repository.



            Given this english.txt file, you can do a random selection with shuf:



            $ shuf -n 4 english.txt 
            anchor
            neck
            trumpet
            response


            Note you'll need way more than just 4 words for a truly secure passphrase. 4 words is for an online service where the number of attempts an attacker might do is very limited. I think the bitcoin recommendation is 16 words, not sure.



            Also in this example, each word may only appear once. If you wish to allow repeated words, you have to duplicate the wordlist itself:



            $ cat english.txt english.txt | shuf -n 4


            That would allow each word to appear twice. Of course you can re-create your english.txt to contain each word multiple times in the first place, then go back to the original command.



            If you want the output in one line, you can just add xargs echo:



            $ shuf -n 4 english.txt | xargs echo
            math easily cube daughter



            On a sidenote, I don't find this style of password to be easily memorable.



            Well, actually I got very lucky with math easily cube daughter since that just happens to make it easy to think of a story where your daughter can easily do math with cubes or whatever. It's something humans can relate to, as is the horse in XKCD's example.



            But what the heck is a anchor neck trumpet response? I'm not a comic book author with creativity to spare to come up with a mnemonic for that. So it will be forgotten in no time.



            Even if you can remember the words, it's hard to remember their correct order. Was it math easily cube daughter or daugher easily math cube or something else?



            And the password is supposed to be random, you're not allowed to pick and modify it.




            As for bitcoin seeds, you're not really supposed to remember them. This is just a way to be able to write it down easily. Anyone can write down 16 words on a piece of paper and read them back correctly; with random letters it's much more likely to make mistakes.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 4 hours ago

























            answered 4 hours ago









            frostschutz

            24.3k14775




            24.3k14775




















                up vote
                1
                down vote













                I have this:



                xkcd_password () 
                command grep "^[[:alpha:]]5,8$" "$1-/usr/share/dict/words"





                share|improve this answer
























                  up vote
                  1
                  down vote













                  I have this:



                  xkcd_password () 
                  command grep "^[[:alpha:]]5,8$" "$1-/usr/share/dict/words"





                  share|improve this answer






















                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    I have this:



                    xkcd_password () 
                    command grep "^[[:alpha:]]5,8$" "$1-/usr/share/dict/words"





                    share|improve this answer












                    I have this:



                    xkcd_password () 
                    command grep "^[[:alpha:]]5,8$" "$1-/usr/share/dict/words"






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 4 hours ago









                    glenn jackman

                    47.6k265104




                    47.6k265104




















                        up vote
                        0
                        down vote













                        First of all, install a dictionary of a language you're familiar with, using:



                        sudo apt-get install <language-package>


                        To see all available packages:



                        apt-cache search wordlist | grep ^w


                        Note: all installation instructions assume you're on a debian-based OS.



                        After you've installed dictionary run:



                        WORDS=5; grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words | shuf -n $WORDS | tr 'n' '-' | sed 's/-$//'


                        Which will output ex:



                        blasphemous-commandos-vasts-suitability-arbor


                        To break it down:




                        • WORDS=5; - choose how many words you wan in your password


                        • grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words - choose only words containing lowercase alphabet characters (it excludes words with ' in them or funky characters like in éclair)


                        • shuf -n $WORDS - chose as many WORDS as you've requested


                        • tr 'n' '-' - join all words using - (feel free to change it)


                        • sed 's/-$//' - remove trailing -

                        Alternatively you can wrap it in a function:



                        #!/bin/bash

                        function memorable_password()
                        words="$1:-5"
                        sep="$2:--"

                        grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words


                        or



                        #!/bin/sh

                        memorable_password() tr 'n' $sep


                        Both of which can be called as such:



                        memorable_password 7 _
                        memorable_password 4
                        memorable_password


                        Returning:



                        skipped_cavity_entertainments_gangway_seaports_spread_communique
                        evaporated-clashes-bold-presuming
                        excelling-thoughtless-pardonable-promulgated-forbearing


                        Hope that helps ^^






                        share|improve this answer








                        New contributor




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





















                          up vote
                          0
                          down vote













                          First of all, install a dictionary of a language you're familiar with, using:



                          sudo apt-get install <language-package>


                          To see all available packages:



                          apt-cache search wordlist | grep ^w


                          Note: all installation instructions assume you're on a debian-based OS.



                          After you've installed dictionary run:



                          WORDS=5; grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words | shuf -n $WORDS | tr 'n' '-' | sed 's/-$//'


                          Which will output ex:



                          blasphemous-commandos-vasts-suitability-arbor


                          To break it down:




                          • WORDS=5; - choose how many words you wan in your password


                          • grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words - choose only words containing lowercase alphabet characters (it excludes words with ' in them or funky characters like in éclair)


                          • shuf -n $WORDS - chose as many WORDS as you've requested


                          • tr 'n' '-' - join all words using - (feel free to change it)


                          • sed 's/-$//' - remove trailing -

                          Alternatively you can wrap it in a function:



                          #!/bin/bash

                          function memorable_password()
                          words="$1:-5"
                          sep="$2:--"

                          grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words


                          or



                          #!/bin/sh

                          memorable_password() tr 'n' $sep


                          Both of which can be called as such:



                          memorable_password 7 _
                          memorable_password 4
                          memorable_password


                          Returning:



                          skipped_cavity_entertainments_gangway_seaports_spread_communique
                          evaporated-clashes-bold-presuming
                          excelling-thoughtless-pardonable-promulgated-forbearing


                          Hope that helps ^^






                          share|improve this answer








                          New contributor




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



















                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            First of all, install a dictionary of a language you're familiar with, using:



                            sudo apt-get install <language-package>


                            To see all available packages:



                            apt-cache search wordlist | grep ^w


                            Note: all installation instructions assume you're on a debian-based OS.



                            After you've installed dictionary run:



                            WORDS=5; grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words | shuf -n $WORDS | tr 'n' '-' | sed 's/-$//'


                            Which will output ex:



                            blasphemous-commandos-vasts-suitability-arbor


                            To break it down:




                            • WORDS=5; - choose how many words you wan in your password


                            • grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words - choose only words containing lowercase alphabet characters (it excludes words with ' in them or funky characters like in éclair)


                            • shuf -n $WORDS - chose as many WORDS as you've requested


                            • tr 'n' '-' - join all words using - (feel free to change it)


                            • sed 's/-$//' - remove trailing -

                            Alternatively you can wrap it in a function:



                            #!/bin/bash

                            function memorable_password()
                            words="$1:-5"
                            sep="$2:--"

                            grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words


                            or



                            #!/bin/sh

                            memorable_password() tr 'n' $sep


                            Both of which can be called as such:



                            memorable_password 7 _
                            memorable_password 4
                            memorable_password


                            Returning:



                            skipped_cavity_entertainments_gangway_seaports_spread_communique
                            evaporated-clashes-bold-presuming
                            excelling-thoughtless-pardonable-promulgated-forbearing


                            Hope that helps ^^






                            share|improve this answer








                            New contributor




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









                            First of all, install a dictionary of a language you're familiar with, using:



                            sudo apt-get install <language-package>


                            To see all available packages:



                            apt-cache search wordlist | grep ^w


                            Note: all installation instructions assume you're on a debian-based OS.



                            After you've installed dictionary run:



                            WORDS=5; grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words | shuf -n $WORDS | tr 'n' '-' | sed 's/-$//'


                            Which will output ex:



                            blasphemous-commandos-vasts-suitability-arbor


                            To break it down:




                            • WORDS=5; - choose how many words you wan in your password


                            • grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words - choose only words containing lowercase alphabet characters (it excludes words with ' in them or funky characters like in éclair)


                            • shuf -n $WORDS - chose as many WORDS as you've requested


                            • tr 'n' '-' - join all words using - (feel free to change it)


                            • sed 's/-$//' - remove trailing -

                            Alternatively you can wrap it in a function:



                            #!/bin/bash

                            function memorable_password()
                            words="$1:-5"
                            sep="$2:--"

                            grep '^[pyfgcrlaoeuidhtnsqjkxbmwvz]*$' /usr/share/dict/words


                            or



                            #!/bin/sh

                            memorable_password() tr 'n' $sep


                            Both of which can be called as such:



                            memorable_password 7 _
                            memorable_password 4
                            memorable_password


                            Returning:



                            skipped_cavity_entertainments_gangway_seaports_spread_communique
                            evaporated-clashes-bold-presuming
                            excelling-thoughtless-pardonable-promulgated-forbearing


                            Hope that helps ^^







                            share|improve this answer








                            New contributor




                            meeDamian 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




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









                            answered 26 mins ago









                            meeDamian

                            1011




                            1011




                            New contributor




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





                            New contributor





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






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




















                                moblie is a new contributor. Be nice, and check out our Code of Conduct.









                                 

                                draft saved


                                draft discarded


















                                moblie is a new contributor. Be nice, and check out our Code of Conduct.












                                moblie is a new contributor. Be nice, and check out our Code of Conduct.











                                moblie is a new contributor. Be nice, and check out our Code of Conduct.













                                 


                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470288%2fone-liner-to-generate-an-easily-memorable-password%23new-answer', 'question_page');

                                );

                                Post as a guest













































































                                Comments

                                Popular posts from this blog

                                Long meetings (6-7 hours a day): Being “babysat” by supervisor

                                What does second last employer means? [closed]

                                One-line joke