{"id":58248,"date":"2025-03-04T18:25:57","date_gmt":"2025-03-04T18:25:57","guid":{"rendered":"http:\/\/18bd3cce-84a2-4fd0-9c65-f8064d6428d0"},"modified":"2025-03-04T18:25:57","modified_gmt":"2025-03-04T18:25:57","slug":"how-to-generate-random-passwords-from-the-linux-command-line","status":"publish","type":"post","link":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/","title":{"rendered":"How to generate random passwords from the Linux command line"},"content":{"rendered":"<figure class=\"c-shortcodeImage u-clearfix c-shortcodeImage-large\">\n<div class=\"c-shortcodeImage_imageContainer\">\n<div class=\"c-shortcodeImage_image\"><picture class=\"c-cmsImage c-cmsImage_loaded\"><source media=\"(max-width: 767px)\" srcset=\"https:\/\/www.zdnet.com\/a\/img\/resize\/b0c79a31d4be58cc2c486e0307947a2aff8828fc\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=768\" alt=\"How to generate random passwords from the Linux command line\"><source media=\"(max-width: 1023px)\" srcset=\"https:\/\/www.zdnet.com\/a\/img\/resize\/29e9479f430fc731d0b4276d775620b2ad4b7f66\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1024\" alt=\"How to generate random passwords from the Linux command line\"><source media=\"(max-width: 1440px)\" srcset=\"https:\/\/www.zdnet.com\/a\/img\/resize\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280\" alt=\"How to generate random passwords from the Linux command line\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.zdnet.com\/a\/img\/resize\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280\" alt=\"How to generate random passwords from the Linux command line\" width=\"1280\" height=\"720\" fetchpriority=\"low\"><\/picture><\/div>\n<\/p><\/div><figcaption> <span class=\"c-shortcodeImage_credit g-outer-spacing-top-xsmall u-block\">ZDNET<\/span><\/figcaption><\/figure>\n<p>I often need random passwords. Mostly, those passwords are used for the creation of user accounts on apps and services, at which point I&#8217;ll use my <a href=\"https:\/\/www.zdnet.com\/article\/best-password-manager\/\">password manager<\/a> that includes a very good random password generator.<\/p>\n<p>But other times, I might need a temporary password that doesn&#8217;t require saving in a password manager. Or maybe it&#8217;s a permanent password, but I&#8217;m <a href=\"https:\/\/www.zdnet.com\/article\/best-remote-access-software\/\">logged into my desktop from a remote machine<\/a>, and the command line is the only tool I have. <\/p>\n<p><strong>Also:&nbsp;<a href=\"https:\/\/www.zdnet.com\/article\/5-linux-commands-i-use-to-keep-my-device-running-smoothly\/\">5 Linux commands I use to keep my device running smoothly<\/a><\/strong><\/p>\n<p>Regardless of why, there&#8217;s a <a href=\"https:\/\/www.zdnet.com\/article\/the-first-5-linux-commands-every-new-user-should-learn\/\">simple Linux command<\/a> that makes it very easy to generate random passwords. That tool is called pwgen, and here&#8217;s how you install and use it. <\/p>\n<h2> How to install pwgen <\/h2>\n<p><strong>What you&#8217;ll need: <\/strong>The only things you&#8217;ll need for this are a Linux distribution and a user with sudo privileges. <\/p>\n<div id=\"87bb1351-a43a-4ce1-8000-d74a9b5f8ff9\" class=\"c-shortcodeListicle g-outer-spacing-bottom-medium\">\n<div class=\"c-shortcodeListicle_conten\"><!----> <!----> <\/p>\n<div class=\"c-shortcodeListicle_dek\" readability=\"7\">\n<div class=\"c-ShortcodeContent\" readability=\"34\">\n<p>To install pwgen on Debian or Ubuntu-based distributions, open a terminal window and issue the command:<\/p>\n<\/div>\n<\/div>\n<p> <a data-cy=\"infoCard_showMore\" class=\"c-shortcodeInfocard-faq-showMore\"> Show more <\/a> <!----><\/div>\n<p> <!----> <!----><\/div>\n<blockquote readability=\"5\">\n<p>sudo apt-get install pwgen -y <\/p>\n<\/blockquote>\n<div id=\"f219eb5f-811d-41af-97dc-c4e99665851f\" class=\"c-shortcodeListicle g-outer-spacing-bottom-medium\">\n<div class=\"c-shortcodeListicle_conten\"><!----> <!----> <\/p>\n<div class=\"c-shortcodeListicle_dek\" readability=\"6.5\">\n<div class=\"c-ShortcodeContent\" readability=\"33\">\n<p>To install pwgen on Fedora-based distributions, open a terminal window and issue the command:<\/p>\n<\/div>\n<\/div>\n<p> <a data-cy=\"infoCard_showMore\" class=\"c-shortcodeInfocard-faq-showMore\"> Show more <\/a> <!----><\/div>\n<p> <!----> <!----><\/div>\n<blockquote>\n<p>sudo dnf install pwgen <\/p>\n<\/blockquote>\n<div id=\"4333c1af-794d-48f2-bd59-e7a998f44259\" class=\"c-shortcodeListicle g-outer-spacing-bottom-medium\">\n<div class=\"c-shortcodeListicle_conten\"><!----> <!----> <\/p>\n<div class=\"c-shortcodeListicle_dek\" readability=\"6.5\">\n<div class=\"c-ShortcodeContent\" readability=\"33\">\n<p>To install pwgen on Arch-based distributions, open a terminal window and issue the command:<\/p>\n<\/div>\n<\/div>\n<p> <a data-cy=\"infoCard_showMore\" class=\"c-shortcodeInfocard-faq-showMore\"> Show more <\/a> <!----><\/div>\n<p> <!----> <!----><\/div>\n<p>sudo pacman -S pwgen <\/p>\n<div id=\"486efc44-0411-4abd-8036-78b353327acb\" class=\"c-shortcodeListicle g-outer-spacing-bottom-medium\">\n<div class=\"c-shortcodeListicle_conten\"><!----> <!----> <\/p>\n<div class=\"c-shortcodeListicle_dek\" readability=\"6.5\">\n<div class=\"c-ShortcodeContent\" readability=\"33\">\n<p>To install pwgen on SUSE-based distributions, open a terminal window and issue the command:<\/p>\n<\/div>\n<\/div>\n<p> <a data-cy=\"infoCard_showMore\" class=\"c-shortcodeInfocard-faq-showMore\"> Show more <\/a> <!----><\/div>\n<p> <!----> <!----><\/div>\n<blockquote readability=\"5\">\n<p>sudo zypper install pwgen <\/p>\n<\/blockquote>\n<p>At this point, the app should be ready to go. <\/p>\n<p><!----><\/p>\n<h2> How to use pwgen<\/h2>\n<p><strong>Also:&nbsp;<\/strong><a href=\"https:\/\/www.zdnet.com\/article\/5-best-linux-commands-for-troubleshooting-problems-and-how-i-use-them\/\"><strong>5 best Linux commands for troubleshooting problems<\/strong><\/a><\/p>\n<h2> 1. Generate a single password <\/h2>\n<p>Let&#8217;s say you want to generate a single password that is 16 characters long. For that, the command would be: <\/p>\n<p>pwgen 16 1 <\/p>\n<h2> 2. Generate three passwords <\/h2>\n<p>You might need to create 3 random passwords, each of which is 16 characters long. For that, the command would be: <\/p>\n<p>pwgen 16 3 <\/p>\n<h2> 3. Generate a list of passwords <\/h2>\n<p>You might want a list of passwords, each of which is 16 characters long. To do that, issue the command: <\/p>\n<p>pwgen 16 <\/p>\n<p>As you can see, the first option tells pwgen how long the password should be, and the second option tells pwgen how many passwords to generate. <\/p>\n<p><strong>Also:&nbsp;<\/strong><a href=\"https:\/\/www.zdnet.com\/article\/5-linux-commands-you-need-to-have-ready-just-in-case\/\"><strong>5 Linux commands you need to have ready &#8211; just in case<\/strong><\/a><\/p>\n<p>You can also use a number of options with pwgen. Those options are: <\/p>\n<ul>\n<li>-c or &#8211;capitalize &#8211; Include at least one capital letter.<\/li>\n<li>-A or &#8211;no-capitalize &#8211; Don&#8217;t include capital letters.<\/li>\n<li>-n or &#8211;numerals &#8211; Include at least one number.<\/li>\n<li>-0 or &#8211;no-numerals &#8211; Don&#8217;t include numbers.<\/li>\n<li>-y or &#8211;symbols &#8211; Include at least one special symbol.<\/li>\n<li>-r or &#8211;remove-chars= &#8211; Remove characters from the set of characters<\/li>\n<li>-s or &#8211;secure &#8211; Generate completely random passwords<\/li>\n<li>-B or &#8211;ambiguous &#8211; Don&#8217;t include ambiguous characters.<\/li>\n<li>-H or &#8211;sha1=path\/to\/file[#seed] &#8211; Use sha1 hash of given file as a (not so) random generator<\/li>\n<li> -C &#8211; Print the generated passwords in columns<\/li>\n<li> -1 &#8211; Don&#8217;t print the generated passwords in columns<\/li>\n<li> -v or &#8211;no-vowels<\/li>\n<\/ul>\n<p>One thing to keep in mind is that pwgen used to have a &#8211;no-space option, which made it possible to use regular expressions in scripts. That option has since been deprecated, so writing scripts with the pwgen command is a bit more complex than it once was. What once could be done with a few lines now requires far longer scripts and would look something like this: <\/p>\n<p><strong>Also:&nbsp;<a href=\"https:\/\/www.zdnet.com\/article\/the-6-linux-commands-youll-need-to-know-for-user-management\/\">The 6 Linux commands you need to know for user management<\/a><\/strong><\/p>\n<blockquote readability=\"36\">\n<p>#!\/bin\/bash <\/p>\n<p># Password length<br \/>PASSWORD_LENGTH=16 <\/p>\n<p># Number of passwords to generate<br \/>NUM_PASSWORDS=5 <\/p>\n<p># Characters to include (lowercase, uppercase, digits, symbols)<br \/>USE_LOWERCASE=true USE_UPPERCASE=true USE_DIGITS=true USE_SYMBOLS=true <\/p>\n<p># Function to generate a password<br \/>generate_password() {<br \/>local characters=&#8221;&#8221;<br \/>if $USE_LOWERCASE; then characters+=&#8221;abcdefghijklmnopqrstuvwxyz&#8221;; fi<br \/>if $USE_UPPERCASE; then characters+=&#8221;ABCDEFGHIJKLMNOPQRSTUVWXYZ&#8221;; fi<br \/>if $USE_DIGITS; then characters+=&#8221;0123456789&#8243;; fi<br \/>if $USE_SYMBOLS; then characters+=&#8221;!@#$%^&amp;*()_+=-`~[]{}|;&#8217;:\\&#8221;,.\/&lt;&gt;?&#8221;; fi <\/p>\n<p>local password=&#8221;&#8221;<br \/>for i in $(seq 1 $PASSWORD_LENGTH); do<br \/>local rand=$(( RANDOM % ${#characters} )) # Get random index<br \/>local char=&#8221;${characters:$rand:1}&#8221; # Get character at that index<br \/>password+=&#8221;$char&#8221; # Append to password<br \/>done<br \/>echo &#8220;$password&#8221;<br \/>} <\/p>\n<p># Generate passwords and print them<br \/>echo &#8220;Generated Passwords:&#8221;<br \/>for i in $(seq 1 $NUM_PASSWORDS); do<br \/>password=$(generate_password)<br \/>echo &#8220;$password&#8221;<br \/>done <\/p>\n<p># Example: Store passwords in an array (optional)<br \/>password_array=()<br \/>for i in $(seq 1 $NUM_PASSWORDS); do<br \/>password=$(generate_password) # Regenerate passwords. If you want to use the first<br \/>password_array+=(&#8220;$password&#8221;)<br \/>done <\/p>\n<p># Print any errors while generating and storing passwords<br \/>if [ $? -ne 0 ]; then<br \/>echo &#8220;An error occurred&#8221;<br \/>fi <\/p>\n<p># (Extra) Example of working with the saved passwords in the array<br \/>echo &#8220;Stored in password_array:&#8221;<br \/>for password in &#8220;${password_array[@]}&#8221;; do<br \/>echo &#8220;$password&#8221;<br \/>done <\/p>\n<\/blockquote>\n<p>Enjoy those random passwords. <\/p>\n<div id=\"pinbox-18bd3cce-84a2-4fd0-9c65-f8064d6428d0\" class=\"c-shortcodePinbox-carousel\">\n<div class=\"c-listingCarouselHorizontal\">\n<h4 class=\"c-sectionHeading\">Open Source<\/h4>\n<p> <!----> <span class=\"c-listingCarouselHorizontal_loadingIndicator\"><\/span> <\/div>\n<\/div>\n<p>READ MORE <a href=\"https:\/\/www.zdnet.com\/article\/how-to-generate-random-passwords-from-the-linux-command-line\/\">HERE<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Need a strong, random password? Linux makes it incredibly easy to generate one &#8211; no password manager required.READ MORE HERE&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_layout":"default_layout","footnotes":""},"categories":[62],"tags":[],"class_list":["post-58248","post","type-post","status-publish","format-standard","hentry","category-zdnet-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to generate random passwords from the Linux command line 2026 | ThreatsHub Cybersecurity News<\/title>\n<meta name=\"description\" content=\"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security &amp; Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to generate random passwords from the Linux command line 2026 | ThreatsHub Cybersecurity News\" \/>\n<meta property=\"og:description\" content=\"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security &amp; Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"ThreatsHub Cybersecurity News\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-04T18:25:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.zdnet.com\/a\/img\/resize\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280\" \/>\n<meta name=\"author\" content=\"TH Author\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@threatshub\" \/>\n<meta name=\"twitter:site\" content=\"@threatshub\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TH Author\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/\"},\"author\":{\"name\":\"TH Author\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#\\\/schema\\\/person\\\/12e0a8671ff89a863584f193e7062476\"},\"headline\":\"How to generate random passwords from the Linux command line\",\"datePublished\":\"2025-03-04T18:25:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/\"},\"wordCount\":776,\"publisher\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.zdnet.com\\\/a\\\/img\\\/resize\\\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\\\/2025\\\/03\\\/04\\\/f25b3d08-a384-4d81-b9a1-9bf56889caba\\\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280\",\"articleSection\":[\"ZDNet | Security\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/\",\"name\":\"How to generate random passwords from the Linux command line 2026 | ThreatsHub Cybersecurity News\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.zdnet.com\\\/a\\\/img\\\/resize\\\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\\\/2025\\\/03\\\/04\\\/f25b3d08-a384-4d81-b9a1-9bf56889caba\\\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280\",\"datePublished\":\"2025-03-04T18:25:57+00:00\",\"description\":\"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security & Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.zdnet.com\\\/a\\\/img\\\/resize\\\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\\\/2025\\\/03\\\/04\\\/f25b3d08-a384-4d81-b9a1-9bf56889caba\\\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280\",\"contentUrl\":\"https:\\\/\\\/www.zdnet.com\\\/a\\\/img\\\/resize\\\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\\\/2025\\\/03\\\/04\\\/f25b3d08-a384-4d81-b9a1-9bf56889caba\\\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/how-to-generate-random-passwords-from-the-linux-command-line\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to generate random passwords from the Linux command line\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/\",\"name\":\"ThreatsHub Cybersecurity News\",\"description\":\"%%focuskw%% Threat Intel \u2013 Threat Intel Services \u2013 CyberIntelligence \u2013 Cyber Threat Intelligence - Threat Intelligence Feeds - Threat Intelligence Reports - CyberSecurity Report \u2013 Cyber Security PDF \u2013 Cybersecurity Trends - Cloud Sandbox \u2013- Threat IntelligencePortal \u2013 Incident Response \u2013 Threat Hunting \u2013 IOC - Yara - Security Operations Center \u2013 SecurityOperation Center \u2013 Security SOC \u2013 SOC Services - Advanced Threat - Threat Detection - TargetedAttack \u2013 APT \u2013 Anti-APT \u2013 Advanced Protection \u2013 Cyber Security Services \u2013 Cybersecurity Services -Threat Intelligence Platform\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#organization\"},\"alternateName\":\"Threatshub.org\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#organization\",\"name\":\"ThreatsHub.org\",\"alternateName\":\"Threatshub.org\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Threatshub_Favicon1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Threatshub_Favicon1.jpg\",\"width\":432,\"height\":435,\"caption\":\"ThreatsHub.org\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/threatshub\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#\\\/schema\\\/person\\\/12e0a8671ff89a863584f193e7062476\",\"name\":\"TH Author\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g\",\"caption\":\"TH Author\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to generate random passwords from the Linux command line 2026 | ThreatsHub Cybersecurity News","description":"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security & Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/","og_locale":"en_US","og_type":"article","og_title":"How to generate random passwords from the Linux command line 2026 | ThreatsHub Cybersecurity News","og_description":"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security & Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.","og_url":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/","og_site_name":"ThreatsHub Cybersecurity News","article_published_time":"2025-03-04T18:25:57+00:00","og_image":[{"url":"https:\/\/www.zdnet.com\/a\/img\/resize\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280","type":"","width":"","height":""}],"author":"TH Author","twitter_card":"summary_large_image","twitter_creator":"@threatshub","twitter_site":"@threatshub","twitter_misc":{"Written by":"TH Author","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/#article","isPartOf":{"@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/"},"author":{"name":"TH Author","@id":"https:\/\/www.threatshub.org\/blog\/#\/schema\/person\/12e0a8671ff89a863584f193e7062476"},"headline":"How to generate random passwords from the Linux command line","datePublished":"2025-03-04T18:25:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/"},"wordCount":776,"publisher":{"@id":"https:\/\/www.threatshub.org\/blog\/#organization"},"image":{"@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/www.zdnet.com\/a\/img\/resize\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280","articleSection":["ZDNet | Security"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/","url":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/","name":"How to generate random passwords from the Linux command line 2026 | ThreatsHub Cybersecurity News","isPartOf":{"@id":"https:\/\/www.threatshub.org\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/#primaryimage"},"image":{"@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/www.zdnet.com\/a\/img\/resize\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280","datePublished":"2025-03-04T18:25:57+00:00","description":"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security & Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.","breadcrumb":{"@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/#primaryimage","url":"https:\/\/www.zdnet.com\/a\/img\/resize\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280","contentUrl":"https:\/\/www.zdnet.com\/a\/img\/resize\/c7f06bd7aa9885f534ad7dbaa0f2241d6cc4902e\/2025\/03\/04\/f25b3d08-a384-4d81-b9a1-9bf56889caba\/how-to-generate-random-passwords-from-the-linux-command-line.jpg?auto=webp&amp;width=1280"},{"@type":"BreadcrumbList","@id":"https:\/\/www.threatshub.org\/blog\/how-to-generate-random-passwords-from-the-linux-command-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.threatshub.org\/blog\/"},{"@type":"ListItem","position":2,"name":"How to generate random passwords from the Linux command line"}]},{"@type":"WebSite","@id":"https:\/\/www.threatshub.org\/blog\/#website","url":"https:\/\/www.threatshub.org\/blog\/","name":"ThreatsHub Cybersecurity News","description":"%%focuskw%% Threat Intel \u2013 Threat Intel Services \u2013 CyberIntelligence \u2013 Cyber Threat Intelligence - Threat Intelligence Feeds - Threat Intelligence Reports - CyberSecurity Report \u2013 Cyber Security PDF \u2013 Cybersecurity Trends - Cloud Sandbox \u2013- Threat IntelligencePortal \u2013 Incident Response \u2013 Threat Hunting \u2013 IOC - Yara - Security Operations Center \u2013 SecurityOperation Center \u2013 Security SOC \u2013 SOC Services - Advanced Threat - Threat Detection - TargetedAttack \u2013 APT \u2013 Anti-APT \u2013 Advanced Protection \u2013 Cyber Security Services \u2013 Cybersecurity Services -Threat Intelligence Platform","publisher":{"@id":"https:\/\/www.threatshub.org\/blog\/#organization"},"alternateName":"Threatshub.org","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.threatshub.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.threatshub.org\/blog\/#organization","name":"ThreatsHub.org","alternateName":"Threatshub.org","url":"https:\/\/www.threatshub.org\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.threatshub.org\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2025\/05\/Threatshub_Favicon1.jpg","contentUrl":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2025\/05\/Threatshub_Favicon1.jpg","width":432,"height":435,"caption":"ThreatsHub.org"},"image":{"@id":"https:\/\/www.threatshub.org\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/threatshub"]},{"@type":"Person","@id":"https:\/\/www.threatshub.org\/blog\/#\/schema\/person\/12e0a8671ff89a863584f193e7062476","name":"TH Author","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g","caption":"TH Author"}}]}},"_links":{"self":[{"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/posts\/58248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/comments?post=58248"}],"version-history":[{"count":0,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/posts\/58248\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/media?parent=58248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/categories?post=58248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/tags?post=58248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}