CINXE.COM
Vi Editor Basics: Must Know Commands
<!DOCTYPE html> <html lang="en" data-color-scheme="system"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Vi Editor Basics: Must Know Commands</title> <meta name="HandheldFriendly" content="True"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="theme-color" content="#007b80"> <link rel="preload" href="/assets/dist/app.min.js?v=dc47750738" as="script"> <link rel="preload" href="/assets/dist/app.min.css?v=dc47750738" as="style"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <style> body { --font-headings: var(--gh-font-heading, var(--font-system)); --font-body: var(--gh-font-heading, var(--font-system)); } </style> <link rel="preload stylesheet" href="https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin> <style>body { --font-body: var(--gh-font-body, 'Figtree'), sans-serif; --font-headings: var(--gh-font-heading, 'Figtree'), sans-serif; }</style> <script async defer src="/assets/dist/app.min.js?v=dc47750738"></script> <link rel="stylesheet" type="text/css" href="/assets/dist/app.min.css?v=dc47750738"> <link rel="preconnect" href="https://a.pub.network/" crossorigin /> <link rel="preconnect" href="https://b.pub.network/" crossorigin /> <link rel="preconnect" href="https://c.pub.network/" crossorigin /> <link rel="preconnect" href="https://d.pub.network/" crossorigin /> <link rel="preconnect" href="https://c.amazon-adsystem.com" crossorigin /> <link rel="preconnect" href="https://s.amazon-adsystem.com" crossorigin /> <link rel="preconnect" href="https://btloader.com/" crossorigin /> <link rel="preconnect" href="https://api.btloader.com/" crossorigin /> <link rel="preconnect" href="https://confiant-integrations.global.ssl.fastly.net" crossorigin /> <link rel="stylesheet" href="https://a.pub.network/core/pubfig/cls.css"> <script data-cfasync="false" type="text/javascript"> var freestar = freestar || {}; freestar.queue = freestar.queue || []; freestar.config = freestar.config || {}; freestar.config.enabled_slots = []; freestar.initCallback = function () { (freestar.config.enabled_slots.length === 0) ? freestar.initCallbackCalled = false : freestar.newAdSlots(freestar.config.enabled_slots) } </script> <script src="https://a.pub.network/itsfoss/pubfig.min.js" data-cfasync="false" async></script> <style> :root { --global-max-width: 1320px; /* site max width */ --global-content-width: 680px; /* post-content-width */ --global-wide-width: 960px; /* site max width */ --global-post-hero-content-max-width: 768px; --global-radius: 5px; /* default radius */ --global-gallery-gap: 1em; /* Image gallery distance between images */ --global-hyphens: none; /* none/auto */ --global-header-height: 72px; --global-theme-notifications: visible; /* visible/hidden */ --global-progress-bar: visible; /* visible/hidden */ --global-content-preview-fading: 0%; /* 50%-100% for fading effect */ --global-hero-img-filter: ; --global-scroll-behavior: auto; } </style> <script> let preferredTheme = localStorage.getItem('PREFERRED_COLOR_SCHEME') || `system`; document.documentElement.setAttribute('data-color-scheme', preferredTheme); // Global values needed const themeGlobal = { currentPage: parseInt(''), nextPage: parseInt(''), nextPageLink: '', maxPages: parseInt(''), lastPage: `` === `` ? true : false, postsPerPage: parseInt('24'), totalPosts: parseInt(''), scrollPos: 0, imageLightbox: `true` === `true` ? true : false, autoloadResources: false, filterScrollBehavior: 'smooth' } // Calculate contrast & HSL value; function getBrandColorInfo(hexcolor) { // get contrast if (hexcolor.slice(0, 1) === '#') { hexcolor = hexcolor.slice(1); } if (hexcolor.length === 3) { hexcolor = hexcolor.split('').map(function (hex) { return hex + hex;}).join(''); } let r = parseInt(hexcolor.substr(0,2),16), g = parseInt(hexcolor.substr(2,2),16), b = parseInt(hexcolor.substr(4,2),16); let yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; const colorContrast = (yiq >= 128) ? '#000' : '#fff'; //get HSL r /= 255, g /= 255, b /= 255; const max = Math.max(r, g, b), min = Math.min(r, g, b); let h, s, l = (max + min) / 2; if ( max == min ) { h = s = 0; } else { let d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min); switch(max){ case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } const colorHSL = [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)]; // return return { colorContrast, colorHSL } }; const brandColor = getBrandColorInfo("#007b80"); let style = document.createElement('style'); style.innerHTML = `:root { --color-brand-contrast: ${brandColor.colorContrast}; --color-brand-h: ${brandColor.colorHSL[0]}; --color-brand-s: ${brandColor.colorHSL[1]}%; --color-brand-l: ${brandColor.colorHSL[2]}%; --color-brand-hsl: ${brandColor.colorHSL[0]} ${brandColor.colorHSL[1]}% ${brandColor.colorHSL[2]}%; }` document.getElementsByTagName('head')[0].appendChild(style); </script> <meta name="description" content="Here are the absolute basic commands you need to navigate through the Vi editor in the command line. Learn the commands and their action."> <link rel="icon" href="https://itsfoss.com/content/images/size/w256h256/2022/12/android-chrome-192x192.png" type="image/png"> <link rel="canonical" href="https://itsfoss.com/vi-editor-basics/"> <meta name="referrer" content="no-referrer-when-downgrade"> <meta property="og:site_name" content="It's FOSS"> <meta property="og:type" content="article"> <meta property="og:title" content="Vi Editor Basics: Must Know Commands"> <meta property="og:description" content="Here are the absolute basic commands you need to navigate through the Vi editor in the command line."> <meta property="og:url" content="https://itsfoss.com/vi-editor-basics/"> <meta property="og:image" content="https://itsfoss.com/content/images/2024/12/vi-editor-essentials.png"> <meta property="article:published_time" content="2024-12-24T05:58:36.000Z"> <meta property="article:modified_time" content="2024-12-28T08:42:25.000Z"> <meta property="article:tag" content="Guides 📒"> <meta property="article:publisher" content="https://www.facebook.com/itsfoss"> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:title" content="Vi Editor Basics: Must Know Commands"> <meta name="twitter:description" content="Here are the absolute basic commands you need to navigate through the Vi editor in the command line."> <meta name="twitter:url" content="https://itsfoss.com/vi-editor-basics/"> <meta name="twitter:image" content="https://itsfoss.com/content/images/2024/12/vi-editor-essentials.png"> <meta name="twitter:label1" content="Written by"> <meta name="twitter:data1" content="Community"> <meta name="twitter:label2" content="Filed under"> <meta name="twitter:data2" content="Guides 📒"> <meta name="twitter:site" content="@itsfoss2"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="450"> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "publisher": { "@type": "Organization", "name": "It's FOSS", "url": "https://itsfoss.com/", "logo": { "@type": "ImageObject", "url": "https://itsfoss.com/content/images/2023/01/itsfoss-logo.png" } }, "author": { "@type": "Person", "name": "Community", "image": { "@type": "ImageObject", "url": "https://itsfoss.com/content/images/2023/03/Community.png", "width": 300, "height": 300 }, "url": "https://itsfoss.com/author/community/", "sameAs": [ "https://itsfoss.community/" ] }, "headline": "Vi Editor Basics: Must Know Commands", "url": "https://itsfoss.com/vi-editor-basics/", "datePublished": "2024-12-24T05:58:36.000Z", "dateModified": "2024-12-28T08:42:25.000Z", "image": { "@type": "ImageObject", "url": "https://itsfoss.com/content/images/2024/12/vi-editor-essentials.png", "width": 800, "height": 450 }, "keywords": "Guides 📒", "description": "Here are the absolute basic commands you need to navigate through the Vi editor in the command line.", "mainEntityOfPage": "https://itsfoss.com/vi-editor-basics/" } </script> <meta name="generator" content="Ghost 5.116"> <link rel="alternate" type="application/rss+xml" title="It's FOSS" href="https://itsfoss.com/rss/"> <script defer src="https://cdn.jsdelivr.net/ghost/portal@~2.50/umd/portal.min.js" data-i18n="true" data-ghost="https://itsfoss.com/" data-key="121ee4fb8f9bf181b8f07c52f6" data-api="https://itsfoss.com/ghost/api/content/" data-locale="en" crossorigin="anonymous"></script><style id="gh-members-styles">.gh-post-upgrade-cta-content, .gh-post-upgrade-cta { display: flex; flex-direction: column; align-items: center; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; text-align: center; width: 100%; color: #ffffff; font-size: 16px; } .gh-post-upgrade-cta-content { border-radius: 8px; padding: 40px 4vw; } .gh-post-upgrade-cta h2 { color: #ffffff; font-size: 28px; letter-spacing: -0.2px; margin: 0; padding: 0; } .gh-post-upgrade-cta p { margin: 20px 0 0; padding: 0; } .gh-post-upgrade-cta small { font-size: 16px; letter-spacing: -0.2px; } .gh-post-upgrade-cta a { color: #ffffff; cursor: pointer; font-weight: 500; box-shadow: none; text-decoration: underline; } .gh-post-upgrade-cta a:hover { color: #ffffff; opacity: 0.8; box-shadow: none; text-decoration: underline; } .gh-post-upgrade-cta a.gh-btn { display: block; background: #ffffff; text-decoration: none; margin: 28px 0 0; padding: 8px 18px; border-radius: 4px; font-size: 16px; font-weight: 600; } .gh-post-upgrade-cta a.gh-btn:hover { opacity: 0.92; }</style><script async src="https://js.stripe.com/v3/"></script> <script defer src="https://cdn.jsdelivr.net/ghost/sodo-search@~1.5/umd/sodo-search.min.js" data-key="121ee4fb8f9bf181b8f07c52f6" data-styles="https://cdn.jsdelivr.net/ghost/sodo-search@~1.5/umd/main.css" data-sodo-search="https://itsfoss.com/" data-locale="en" crossorigin="anonymous"></script> <link href="https://itsfoss.com/webmentions/receive/" rel="webmention"> <script defer src="/public/cards.min.js?v=dc47750738"></script> <link rel="stylesheet" type="text/css" href="/public/cards.min.css?v=dc47750738"> <script defer src="/public/member-attribution.min.js?v=dc47750738"></script><style>:root {--ghost-accent-color: #007b80;}</style> <style> body { --global-max-width: 1400px; --global-content-width: 70rem; } </style> <style> @media only screen and (max-width: 600px) { .hide-mobile {display:none;} } </style> <!-- CSS for bullet point rendering issue on course pages --> <style> .content ul li { list-style: inside; margin-bottom: 2rem; } </style> <!-- Vimeo embed fix for custom docs pages --> <style> .js-reframe { padding-top: 0px !important; } </style> <!-- Sourcepoint CMP CSS for geo depending button --> <style> #pmLink { visibility: hidden; text-decoration: none; cursor: pointer; background: transparent; border: none; } #pmLink:hover { visibility: visible; color: grey; } </style> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-24863836-4"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-24863836-4'); </script> <!-- Umami analytics --> <script async src="https://groovy-manul.pikapod.net/script.js" data-website-id="9f9bd940-0b37-4748-8257-9814959d3526"></script> <!-- Contextly Related Posts --> <script> !function(w,d,id,ns,s){var c=w[ns]=w[ns]||{};if(c.ready||(c.q=[],c.ready=function(){c.q.push(arguments)}),!d.getElementById(id)){var e=d.createElement(s);e.id=id,e.src="https://assets.context.ly/kit/6.latest/loader.js";var h=d.getElementsByTagName(s)[0];h.parentNode.insertBefore(e,h)}}(window,document,"ctx-loader","Contextly","script"); </script> <!-- Open Links in New Tab --> <script> document.addEventListener('DOMContentLoaded', function() { var links = document.querySelectorAll('a'); links.forEach(function(link) { if (link.hostname != window.location.hostname) { link.target = '_blank'; } }); }); </script> </head> <body class="post-template tag-guides " data-hero-image=""> <div class="progress-bar"></div> <header class="header js-header" data-header="normal"> <div class="container wrapper flex is-rel header__inner"> <a class="header__brand" href="https://itsfoss.com"> <picture class=""> <source srcset="/content/images/size/w300/format/webp/2023/01/itsfoss-logo.png 300w," data-sizes="auto" type="image/webp" > <img class="header__logo" data-srcset="/content/images/size/w300/2023/01/itsfoss-logo.png 300w," srcset="/content/images/size/w30/2023/01/itsfoss-logo.png" data-sizes="auto" data-src="/content/images/size/w100/2023/01/itsfoss-logo.png" src="/content/images/size/w30/2023/01/itsfoss-logo.png" alt="It's FOSS" loading="eager" > </picture></a> <nav class="header__menu items-center"> <ul class="nav"> <li class="nav-news" data-label="📰 News" data-length="7"> <a href="https://news.itsfoss.com/"> <span>📰 News</span> </a> </li> <li class="nav-newsletter" data-label="📬 Newsletter" data-length="13"> <a href="https://itsfoss.com/newsletter/"> <span>📬 Newsletter</span> </a> </li> <li class="nav-quizzes-puzzles" data-label="🧩 Quizzes & Puzzles" data-length="20"> <a href="https://itsfoss.com/quiz/"> <span>🧩 Quizzes & Puzzles</span> </a> </li> <li class="nav-resources" data-label="🎒 Resources" data-length="12"> <a href="https://itsfoss.com/resources/"> <span>🎒 Resources</span> </a> </li> <li class="nav-community" data-label="🏘️ Community" data-length="13"> <a href="https://itsfoss.community/"> <span>🏘️ Community</span> </a> </li> <li class="nav-about" data-label="📖 About" data-length="8"> <a href="https://itsfoss.com/about/"> <span>📖 About</span> </a> </li> <li class="nav-contact is-subitem" data-label="-🪪 Contact" data-length="11"> <a href="https://itsfoss.com/contact-us/"> <span>-🪪 Contact</span> </a> </li> <li class="nav-policies is-subitem" data-label="-📜 Policies" data-length="12"> <a href="https://itsfoss.com/policies/"> <span>-📜 Policies</span> </a> </li> </ul> <div class="header__menu--sub items-center"> <button class="header__menu--more is-mainitem" aria-label="Menu"><i class="icon icon-dots"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-dots" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <circle cx="5" cy="12" r="1"></circle> <circle cx="12" cy="12" r="1"></circle> <circle cx="19" cy="12" r="1"></circle> </svg> </i></button> <ul class="nav secondary submenu"> <li class="nav-linux-server-side" data-label="Linux Server Side" data-length="17"> <a href="https://linuxhandbook.com/"> <span>Linux Server Side</span> </a> </li> <li class="nav-en-espanol" data-label="En Español" data-length="10"> <a href="https://itsfoss.com/es/"> <span>En Español</span> </a> </li> <li class="nav-feedback" data-label="🗳️ Feedback" data-length="12"> <a href="https://itsfoss.com/update-feedback/"> <span>🗳️ Feedback</span> </a> </li> <li class="nav-impressum" data-label="Impressum" data-length="9"> <a href="https://itsfoss.com/impressum/"> <span>Impressum</span> </a> </li> <li class="nav-terms-of-use" data-label="Terms of use" data-length="12"> <a href="https://itsfoss.com/terms/"> <span>Terms of use</span> </a> </li> </ul> </div> </nav> <span class="header--spacer"></span> <button class="btn-toggle header-search__toggle" data-ghost-search title="Search" aria-label="Search"> <i class="icon icon-search"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <circle cx="10" cy="10" r="7" /> <line x1="21" y1="21" x2="15" y2="15" /> </svg> </i> </button> <a href="/signup/" class="btn signup-link btn--brand radius" data-portal="signup">Subscribe</a> <div class="member-menu js-member-menu"> <a href="/signup/" data-portal="signup" class="signup-link"> <i class="icon icon-arrow-up-right icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-up-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <line x1="17" y1="7" x2="7" y2="17" /> <polyline points="8 7 17 7 17 16" /> </svg> </i>Sign up </a> <a href="/signin/" data-portal="signin" class="signin-link"> <i class="icon icon-login icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-in"> <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path> <polyline points="10 17 15 12 10 7"></polyline> <line x1="15" y1="12" x2="3" y2="12"></line> </svg> </i>Sign in </a> </div> <button class="btn-toggle menu__toggle js-menu-open" type="button" title="Menu" aria-label="Menu"> <span></span> <span></span> </button> </div> </header> <div class="menu js-menu"> <div class="menu__header flex content-end"> <button class="btn-toggle menu__toggle is-active js-menu-close" type="button" title="Menu" aria-label="Menu"> <span></span> <span></span> </button> </div> <nav class="menu__navigation"> <ul class="nav"> <li class="nav-news" data-label="📰 News" data-length="7"> <a href="https://news.itsfoss.com/"> <span>📰 News</span> </a> </li> <li class="nav-newsletter" data-label="📬 Newsletter" data-length="13"> <a href="https://itsfoss.com/newsletter/"> <span>📬 Newsletter</span> </a> </li> <li class="nav-quizzes-puzzles" data-label="🧩 Quizzes & Puzzles" data-length="20"> <a href="https://itsfoss.com/quiz/"> <span>🧩 Quizzes & Puzzles</span> </a> </li> <li class="nav-resources" data-label="🎒 Resources" data-length="12"> <a href="https://itsfoss.com/resources/"> <span>🎒 Resources</span> </a> </li> <li class="nav-community" data-label="🏘️ Community" data-length="13"> <a href="https://itsfoss.community/"> <span>🏘️ Community</span> </a> </li> <li class="nav-about" data-label="📖 About" data-length="8"> <a href="https://itsfoss.com/about/"> <span>📖 About</span> </a> </li> <li class="nav-contact is-subitem" data-label="-🪪 Contact" data-length="11"> <a href="https://itsfoss.com/contact-us/"> <span>-🪪 Contact</span> </a> </li> <li class="nav-policies is-subitem" data-label="-📜 Policies" data-length="12"> <a href="https://itsfoss.com/policies/"> <span>-📜 Policies</span> </a> </li> </ul> <ul class="nav secondary submenu"> <li class="nav-linux-server-side" data-label="Linux Server Side" data-length="17"> <a href="https://linuxhandbook.com/"> <span>Linux Server Side</span> </a> </li> <li class="nav-en-espanol" data-label="En Español" data-length="10"> <a href="https://itsfoss.com/es/"> <span>En Español</span> </a> </li> <li class="nav-feedback" data-label="🗳️ Feedback" data-length="12"> <a href="https://itsfoss.com/update-feedback/"> <span>🗳️ Feedback</span> </a> </li> <li class="nav-impressum" data-label="Impressum" data-length="9"> <a href="https://itsfoss.com/impressum/"> <span>Impressum</span> </a> </li> <li class="nav-terms-of-use" data-label="Terms of use" data-length="12"> <a href="https://itsfoss.com/terms/"> <span>Terms of use</span> </a> </li> </ul> </nav> <div class="menu__actions flex w-100"> <a href="/signin/" data-portal="signin" class="btn signin-link btn--bordered radius m-r"> Log in </a> <a href="/signup/" data-portal="signup" class="btn signup-link btn--brand radius"> Subscribe </a> </div> <template data-toggle-template> <button class="submenu-toggle" onclick="this.parentNode.classList.toggle('is-active')" title="Menu toggle" aria-label="Menu toggle"> <i class="icon icon-chevron-down"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-down" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <polyline points="6 9 12 15 18 9"></polyline> </svg> </i> </button> </template> </div> <main class="main"> <div class="container wrapper m-0-auto"> <div class="post-hero is-post" data-feature-image="true" data-image-style="max-width"> <div class="post-hero__content flex flex-col"> <h1 class="post-hero__title">Absolute Essentials You Need to Know to Survive Vi Editor</h1> <div class="post-hero__excerpt text-acc">Here are the absolute basic commands you need to navigate through the Vi editor in the command line.</div> <div class="resource-rating"> <i class="icon icon-star icon--sm filled"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-star" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" /> </svg> </i> <i class="icon icon-star icon--sm filled"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-star" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" /> </svg> </i> <i class="icon icon-star icon--sm filled"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-star" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" /> </svg> </i> <i class="icon icon-star icon--sm filled"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-star" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" /> </svg> </i> <i class="icon icon-star icon--sm filled"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-star" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" /> </svg> </i> </div> <div class="post-info text-acc m-t"> <ul class="post-info__avatars"> <li class="author-avatar has-image"> <a href="/author/community/" title="Community" aria-label="Community"> <picture class=""> <source data-srcset="/content/images/size/w30/format/webp/2023/03/Community.png 30w,/content/images/size/w100/format/webp/2023/03/Community.png 100w," data-sizes="auto" type="image/webp" > <img class="lazyload" data-srcset="/content/images/size/w30/2023/03/Community.png 30w,/content/images/size/w100/2023/03/Community.png 100w," srcset="/content/images/size/w30/2023/03/Community.png" data-sizes="auto" data-src="/content/images/size/w100/2023/03/Community.png" src="/content/images/size/w30/2023/03/Community.png" alt="Community" > </picture> </a> </li> </ul> <div class="post-info__detail"> <span class="post-info__author"><a href="/author/community/">Community</a></span> <div class="post-info__dr"> <time datetime="2024-12-24">28 Dec 2024</time> <span class="post-info__readtime">5 min read</span> <a class="post-info__readtime" href="#fastcomments-widget"> <script src="https://cdn.fastcomments.com/js/widget-comment-count.min.js"></script> <div id="fastcomments-widget-comment-count"></div> <script> FastCommentsCommentCount(document.getElementById('fastcomments-widget-comment-count'), { tenantId: 'zzbYFZ39cH4', urlId: null }); </script> </a> </div> </div> </div> </div> </div> <div class="row m-b-lg"> <div class="col-xs-12 col-lg-3"> <div class="post-toc js-post-toc is-aside"> <div class="post-toc__header flex items-center"> <button class="post-toc__toggle js-toc-toggle"> <span class="m-r-sm uppercase">On this page</span> <i class="icon icon-list icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-list" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <line x1="9" y1="6" x2="20" y2="6" /> <line x1="9" y1="12" x2="20" y2="12" /> <line x1="9" y1="18" x2="20" y2="18" /> <line x1="5" y1="6" x2="5" y2="6.01" /> <line x1="5" y1="12" x2="5" y2="12.01" /> <line x1="5" y1="18" x2="5" y2="18.01" /> </svg> </i> </button> </div> <div class="post-toc__content js-toc"></div> <div class="hide-mobile"> <div align="center" data-freestar-ad="__336x280 __336x280" id="itsfoss_300x250_300x600_Sidebar3_new" style="margin-top:5px"> <script data-cfasync="false" type="text/javascript"> freestar.config.enabled_slots.push({ placementName: "itsfoss_300x250_300x600_Sidebar3_new", slotId: "itsfoss_300x250_300x600_Sidebar3_new" }); </script> </div> </div> </div> </div> <div class="col-xs-12 col-lg-6"> <article class="post tag-guides content post-access-public no-overflow"> <div class="hide-mobile"> <!-- code from Primis/Freestar - Itsfoss.com --> <div id="FreeStarVideoAdContainer"> <div id="freestar-video-parent"> <div id="freestar-video-child"></div> </div> </div> <!-- code from Primis/Freestar --> </div> <a href="https://www.warp.dev?utm_source=its_foss&utm_medium=display&utm_campaign=linux_launch" target="_blank"><img src="/assets/images/warp.webp" alt="Warp Terminal"></a> <p>Vi is on almost every Unix and Linux distribution, so why not take advantage of it?</p><p><a href="https://ex-vi.sourceforge.net/">VI</a>, pronounced as distinct letters <a href="https://upload.wikimedia.org/wikipedia/commons/transcoded/4/42/En-us-vi.oga/En-us-vi.oga.mp3">/ˌviːˈaɪ/</a> it's a <a href="https://itsfoss.com/command-line-text-editors-linux/">terminal-based text editor</a>. One of the most common tools in Unix, VI is extremely powerful for text manipulation. Although it could be a little bit challenging. And that's why I am listing the absolute basics of the Vi editor commands in this article.</p><div class="kg-card kg-callout-card kg-callout-card-blue"><div class="kg-callout-emoji">📋</div><div class="kg-callout-text">Vim is a popular fork/clone of VI. It includes additional features like syntax highlighting, mouse support (yes, you read that right) and more. Basic commands and keyboard shortcuts remain the same in both VI and Vim. So if you learn Vi, you are automatically learning the basics of Vim and other descendants of Vi.</div></div><h2 id="why-you-should-learn-vi">Why you should learn Vi?</h2><p>Here are five reasons why I recommend learning Vi and Vim:</p><ol><li>Vi/Vim is free and open source. And remember this is <a href="https://itsfoss.com/">it's foss!!</a></li><li>Vi is always available since it's required by POSIX. </li><li>Vi/Vim is well documented. And it also has its own user manual; you only need to type <code>:h</code> in command mode. I'll discuss command mode later in this guide.</li><li>Vi/Vim has a lot of plugins. <a href="https://vimawesome.com/">Vim Awesome</a> is one of the most popular websites to download extensions.</li><li>It does not consume a lot of system resources, and you could do a lot of tasks, even <a href="https://news.itsfoss.com/configuring-vim-writing/">write novels in Vim</a>.</li></ol><div class="kg-card kg-callout-card kg-callout-card-yellow"><div class="kg-callout-emoji">✋</div><div class="kg-callout-text">It is not uncommon for some distributions to replace Vi with Vim. Even if you are using Vi commands, it runs Vim. </div></div><h2 id="launch-vi">Launch Vi</h2><p>To execute the program, you must type vi:</p><pre><code>vi</code></pre><figure class="kg-card kg-image-card"><img src="https://itsfoss.com/content/images/2024/12/vim-welcome-screen.png" class="kg-image" alt="Vim welcome page" loading="lazy" width="615" height="424" srcset="https://itsfoss.com/content/images/size/w600/2024/12/vim-welcome-screen.png 600w, https://itsfoss.com/content/images/2024/12/vim-welcome-screen.png 615w"></figure><p>Also, you could open a file by providing its name. It will open the file for editing if it exists, or create a new one if it does not exist.</p><pre><code>vi your_file.txt</code></pre><figure class="kg-card kg-image-card"><img src="https://itsfoss.com/content/images/2024/12/open-file-vi.png" class="kg-image" alt="Vim page with a file" loading="lazy" width="606" height="428" srcset="https://itsfoss.com/content/images/size/w600/2024/12/open-file-vi.png 600w, https://itsfoss.com/content/images/2024/12/open-file-vi.png 606w"></figure><h2 id="vi-modes">Vi modes</h2><p>You must understand that Vi has 2 different modes:</p><ul><li>Normal or command mode: This is the mode you use for navigating and copy-pasting</li><li>Insert mode: This is the editing mode where you actually type text</li></ul><h3 id="using-normal-mode-in-vi">Using Normal mode in Vi</h3><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">💡</div><div class="kg-callout-text">This is the default mode when VI/Vim opens.</div></div><p>The <strong>Normal mode</strong> is used for actions like navigation, copy, paste, delete, text substitution (not editing), etc. You always could go back to this mode by pressing <Esc>.</p><h4 id="1-movement-commands">1. Movement commands</h4><p>These are the movement keys:</p><ul><li><code>h</code>: Left.</li><li><code>j</code>: Down.</li><li><code>k</code>: Up.</li><li><code>l</code>: Right.</li></ul><h4 id="2-deletion-commands">2. Deletion commands</h4><ul><li><code>x</code>: It's like the delete key. Delete the character under the cursor.</li><li><code>dd</code>: Deletes the current line.</li></ul><h4 id="3-copy-and-paste">3. Copy and paste</h4><ul><li><code>y</code>: Yank (Copy) command. Copies the selected text.</li><li><code>yy</code>: Yank (Copy) command. Copies the current line.</li><li><code>p</code>: Paste. After using a copy command, it pastes the content after the cursor.</li></ul><h3 id="command-mode"><em>(Command Mode)</em></h3><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">💡</div><div class="kg-callout-text">In fact, this is not a different mode (that's why parentheses are used), but it's important to separate it because it's where you could type orders and commands</div></div><p>In normal mode, you could use commands by typing <code>:</code>.</p><p>For example, if you want to <a href="https://itsfoss.com/how-to-exit-vim/" rel="noreferrer">save your text and exit Vi</a>, you can type:</p><p><code>:wq</code></p><figure class="kg-card kg-image-card"><img src="https://itsfoss.com/content/images/2024/12/quit-vi.png" class="kg-image" alt="Save and Exit from Vim" loading="lazy" width="610" height="428" srcset="https://itsfoss.com/content/images/size/w600/2024/12/quit-vi.png 600w, https://itsfoss.com/content/images/2024/12/quit-vi.png 610w"></figure><p>Other common Vi commands you can use in normal/command mode:</p><ul><li><code>:h</code>: Help</li><li><code>:/string</code>: Search for string (use n/N to move to next/previous occurrence)</li><li><code>:u</code>: Undo last action</li><li><code>:w</code>: Save</li><li><code>:q</code>: Quit</li><li><code>!</code>: Forces order (<code>:q!</code> becomes force quit)</li></ul><p>I have added <code>:</code> in front of each command so that it is easier to note that you have to use <code>:</code> to use the commands.</p><p>You can perform search and replace action in command mode with <code>:%s/foo/bar/g</code> where <code>%</code> means search-replace will take place in the entire document. With <code>/g</code>, the search-replace will be global, meaning all occurrences of foo will be replaced with bar.</p><h3 id="insert-mode">Insert mode</h3><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">💡</div><div class="kg-callout-text">In this mode, you could edit and manipulate the text.</div></div><p>You could enter this mode by pressing the letter <code>i</code> in Normal Mode and start typing whatever you want.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://itsfoss.com/content/images/2024/12/vi-insert-mode-1.png" class="kg-image" alt="Entering in Insert Mode" loading="lazy" width="610" height="428" srcset="https://itsfoss.com/content/images/size/w600/2024/12/vi-insert-mode-1.png 600w, https://itsfoss.com/content/images/2024/12/vi-insert-mode-1.png 610w"><figcaption><span style="white-space: pre-wrap;">Look at the bottom left to check insert mode</span></figcaption></figure><ul><li><code>i</code>: Enter in Insert mode. Lets you insert, before the current cursor position.</li><li><code>I</code>: Lets you insert at the beginning of the line.</li><li><code>a</code>: Lets you append after the cursor.</li><li><code>A</code>: Lets you append at the end of the line.</li></ul><h3 id="visual-mode-only-in-vim">Visual Mode (only in Vim)</h3><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">💡</div><div class="kg-callout-text">In this mode, you could select text visually, which is very useful when working with large paragraphs.</div></div><p>You could enter this mode by pressing the letter:</p><ul><li><code>v</code>: Character mode</li><li><code>V</code>: Line Mode</li><li><code>Ctrl+V</code>: Block mode</li></ul><p>Learn <a href="https://linuxhandbook.com/vim-visual-mode/">more about the visual mode in Vim here</a>.</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://linuxhandbook.com/vim-visual-mode/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Visual Mode in Vim [Beginner’s Guide]</div><div class="kg-bookmark-description">There are three modes in Vim and the least popular and yet quite interesting is the Visual mode. Learn more about it.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://itsfoss.com/content/images/icon/Linux-Handbook-New-Logo.png" alt=""><span class="kg-bookmark-author">Linux Handbook</span><span class="kg-bookmark-publisher">Pratham Patel</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://itsfoss.com/content/images/thumbnail/visual-mode-in-vim.png" alt="" onerror="this.style.display = 'none'"></div></a></figure><h2 id="a-vi-bit-of-history-and-trivia">A "vi" bit of history and trivia</h2><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">💡</div><div class="kg-callout-text">Did you know Vi is tiny, with just 160 kB in size?</div></div><p>It was developed in 1976 by Bill Joy as a visual mode of the <strong>ex</strong> line editor, also cowritten by Bill Joy.</p><p>A 2009 survey of <em>Linux Journal</em> readers found that vi was the most widely used text editor, beating the second <a href="https://itsfoss.com/gedit-tweaks/">Gedit</a>, by nearly a factor of two (36% to 19%).</p><p>It was not until 2002 that VI was released as an open-source program under the <a href="https://www.tuhs.org/Archive/Caldera-license.pdf">BSD-style license</a>.</p><p><a href="https://www.vim.org/">Vim</a> (VI Improved) it's a free and open-source clone of <a href="https://en.wikipedia.org/wiki/Stevie_(text_editor)">Stevie (ST Editor for VI Enthusiasts)</a>, developed in 1991 by <a href="https://en.wikipedia.org/wiki/Bram_Moolenaar">Bram Moolenaar</a>. It has a huge number of extensions.</p><h2 id="conclusion">Conclusion</h2><p>Among all the <a href="https://itsfoss.com/command-line-text-editors-linux/" rel="noreferrer">terminal based text editors</a>, I prefer the Vi ecosystem.</p><p>VI/Vim is omnipresent in Unix-like operating systems due to its POSIX syntax, and when you invest a little time to unwrap its real power, you could master one of the best text-editor. </p><p>Also, you could keep growing; you could use <a href="https://neovim.io/">NeoVim</a> and its myriad of extensions and add-ons to arrive at a full IDE. The sky (and your <a href="https://www.lua.org/">Lua programming</a> knowledge) is the limit.</p><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">📜</div><div class="kg-callout-text">BTW, this article has been fully written in (Neo)Vim. :)</div></div> <!--kg-card-begin: html--> <h3 id="jose">Author Info</h3> <section> <figure style="float: left; width: 20%; margin-left: 0px; margin-right: 15px;"> <img src="https://itsfoss.com/content/images/2024/12/gose.webp" alt="Jose Antonio"></figure> <p><B>Jose Antonio Tenés</B><br> A Communication engineer by education, and Linux user by passion. In my spare time, I play chess, do you dare? </p></section> <!--kg-card-end: html--> </article> <div class="post-tags content-width"> <a href="/tag/guides/" style="--color-accent:#592008;">Guides 📒</a> </div> <div class="social-share content-width m-b-lg"> <a class="social-share__item twitter js-share" target="_blank" href="https://twitter.com/share?text=Absolute%20Essentials%20You%20Need%20to%20Know%20to%20Survive%20Vi%20Editor&url=https://itsfoss.com/vi-editor-basics/" title="Share on X" aria-label="Share on X"> <i class="icon icon-twitter-x icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M4 4l11.733 16h4.267l-11.733 -16z"></path> <path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"></path> </svg> </i> <span>Share</span> </a> <a class="social-share__item bluesky js-share" target="_blank" href="https://bsky.app/intent/compose?text=Absolute%20Essentials%20You%20Need%20to%20Know%20to%20Survive%20Vi%20Editor%20https://itsfoss.com/vi-editor-basics/" title="Share on Bluesky" aria-label="Share on Bluesky"> <i class="icon icon-brand-bluesky icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-brand-bluesky"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.335 5.144c-1.654 -1.199 -4.335 -2.127 -4.335 .826c0 .59 .35 4.953 .556 5.661c.713 2.463 3.13 2.75 5.444 2.369c-4.045 .665 -4.889 3.208 -2.667 5.41c1.03 1.018 1.913 1.59 2.667 1.59c2 0 3.134 -2.769 3.5 -3.5c.333 -.667 .5 -1.167 .5 -1.5c0 .333 .167 .833 .5 1.5c.366 .731 1.5 3.5 3.5 3.5c.754 0 1.637 -.571 2.667 -1.59c2.222 -2.203 1.378 -4.746 -2.667 -5.41c2.314 .38 4.73 .094 5.444 -2.369c.206 -.708 .556 -5.072 .556 -5.661c0 -2.953 -2.68 -2.025 -4.335 -.826c-2.293 1.662 -4.76 5.048 -5.665 6.856c-.905 -1.808 -3.372 -5.194 -5.665 -6.856z" /></svg> </i> <span>Share</span> </a> <a class="social-share__item facebook js-share" target="_blank" href="https://www.facebook.com/sharer.php?u=https://itsfoss.com/vi-editor-basics/" title="Share on Facebook" aria-label="Share on Facebook"> <i class="icon icon-facebook icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-facebook" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3" /> </svg> </i> <span>Share</span> </a> <a class="social-share__item linkedin js-share" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=https://itsfoss.com/vi-editor-basics/&title=Absolute%20Essentials%20You%20Need%20to%20Know%20to%20Survive%20Vi%20Editor&summary=Absolute%20Essentials%20You%20Need%20to%20Know%20to%20Survive%20Vi%20Editor" title="Share on Linkedin" aria-label="Share on Linkedin"> <i class="icon icon-linkedin icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-linkedin"> <path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path> <rect x="2" y="9" width="4" height="12"></rect> <circle cx="4" cy="4" r="2"></circle> </svg> </i> <span>Share</span> </a> <a class="social-share__item mail" href="/cdn-cgi/l/email-protection#f9c68a8c9b939c9a8dc4b89b8a96958c8d9cdccbc9bc8a8a9c978d9098958adccbc9a0968cdccbc9b79c9c9ddccbc98d96dccbc9b297968edccbc98d96dccbc9aa8c8b8f908f9cdccbc9af90dccbc9bc9d908d968bdf9b969d80c4918d8d898ac3d6d6908d8a9f968a8ad79a9694d68f90d49c9d908d968bd49b988a909a8ad6df979b8a89c2b89b8a96958c8d9cdccbc9bc8a8a9c978d9098958adccbc9a0968cdccbc9b79c9c9ddccbc98d96dccbc9b297968edccbc98d96dccbc9aa8c8b8f908f9cdccbc9af90dccbc9bc9d908d968b" title="Share by email" aria-label="Share by email"> <i class="icon icon-mail icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-mail" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <rect x="3" y="5" width="18" height="14" rx="2" /> <polyline points="3 7 12 13 21 7" /> </svg> </i> <span>Email</span> </a> <a class="social-share__item linkedin" target="_blank" href="https://itsfoss.com/update-feedback/" title="Feedback" aria-label="Feedback"> <i class="icon icon-info icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-info-circle" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <circle cx="12" cy="12" r="9" /> <line x1="12" y1="8" x2="12.01" y2="8" /> <polyline points="11 12 12 12 12 16 13 16" /> </svg> </i> <span>Feedback</span> </a> </div> <div class="content-width author-info"> <span class="section-title text-10 m-b uppercase">About the author</span> <div class="author-card in-post m-b-xl author-community"> <a href="/author/community/"> <figure class="author-card__profile"> <picture class=""> <source data-srcset="/content/images/size/w100/format/webp/2023/03/Community.png 100w,/content/images/size/w300/format/webp/2023/03/Community.png 300w,/content/images/size/w600/format/webp/2023/03/Community.png 600w," data-sizes="auto" type="image/webp" > <img class="lazyload author-card__img" data-srcset="/content/images/size/w100/2023/03/Community.png 100w,/content/images/size/w300/2023/03/Community.png 300w,/content/images/size/w600/2023/03/Community.png 600w," srcset="/content/images/size/w30/2023/03/Community.png" data-sizes="auto" data-src="/content/images/size/w100/2023/03/Community.png" src="/content/images/size/w30/2023/03/Community.png" alt="Community" > </picture> </figure> </a> <div class="author-card__content flex-1 has-image"> <h2 class="author-card__name"><a href="/author/community/">Community</a></h2> <p class="author-card__bio">Written by a community member, a reader who is not part of the It's FOSS writing team. The views and opinions expressed are those of the authors and do not necessarily reflect that of It's FOSS.</p> <div class="author-card__info flex flex-cc"> <ul class="author-card__social has-website"> <li> <a href="https://itsfoss.community/" class="" title="Website" aria-label="Website" target="_blank" rel="noopener noreferrer"> <i class="icon icon-link icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" /> <path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" /> </svg> </i> </a> </li> </ul> </div> </div> </div> </div> </div> <div class="col-xs-12 col-lg-3 hide-mobile"> <aside class="sidebar"> <span class="section-title sm">Featured</span> <div class="sidebar__section"> <a class="sidebar-story" href="https://itsfoss.com/zimacube-review/"> <figure class="sidebar-story__media m-r"> <picture class=""> <source data-srcset="/content/images/size/w100/format/webp/2024/11/zimacube--1-.png 100w,/content/images/size/w300/format/webp/2024/11/zimacube--1-.png 300w," data-sizes="auto" type="image/webp" > <img class="lazyload" data-srcset="/content/images/size/w100/2024/11/zimacube--1-.png 100w,/content/images/size/w300/2024/11/zimacube--1-.png 300w," srcset="/content/images/size/w30/2024/11/zimacube--1-.png" data-sizes="auto" data-src="/content/images/size/w100/2024/11/zimacube--1-.png" src="/content/images/size/w30/2024/11/zimacube--1-.png" alt="Zimacube review" > </picture> </figure> <div class="sidebar-story__content"> <h3 class="sidebar-story__title">ZimaCube Review: Almost Perfect Out of Box Homelab Experience in Local Cloud Setup</h3> </div> </a><a class="sidebar-story" href="https://itsfoss.com/quiz/save-tux-linux-commands/"> <figure class="sidebar-story__media m-r"> <picture class=""> <source data-srcset="/content/images/size/w100/format/webp/2024/11/tux-rescue.png 100w,/content/images/size/w300/format/webp/2024/11/tux-rescue.png 300w," data-sizes="auto" type="image/webp" > <img class="lazyload" data-srcset="/content/images/size/w100/2024/11/tux-rescue.png 100w,/content/images/size/w300/2024/11/tux-rescue.png 300w," srcset="/content/images/size/w30/2024/11/tux-rescue.png" data-sizes="auto" data-src="/content/images/size/w100/2024/11/tux-rescue.png" src="/content/images/size/w30/2024/11/tux-rescue.png" alt="save the tux" > </picture> </figure> <div class="sidebar-story__content"> <h3 class="sidebar-story__title">Save The Tux With Linux Command Knowledge Quiz</h3> </div> </a><a class="sidebar-story" href="https://itsfoss.com/opencoder-vscode/"> <figure class="sidebar-story__media m-r"> <picture class=""> <source data-srcset="/content/images/size/w100/format/webp/2024/11/running-opencoder-llm-in-vscode.png 100w,/content/images/size/w300/format/webp/2024/11/running-opencoder-llm-in-vscode.png 300w," data-sizes="auto" type="image/webp" > <img class="lazyload" data-srcset="/content/images/size/w100/2024/11/running-opencoder-llm-in-vscode.png 100w,/content/images/size/w300/2024/11/running-opencoder-llm-in-vscode.png 300w," srcset="/content/images/size/w30/2024/11/running-opencoder-llm-in-vscode.png" data-sizes="auto" data-src="/content/images/size/w100/2024/11/running-opencoder-llm-in-vscode.png" src="/content/images/size/w30/2024/11/running-opencoder-llm-in-vscode.png" alt="opencoder LLM" > </picture> </figure> <div class="sidebar-story__content"> <h3 class="sidebar-story__title">Running Opencoder LLM in VS Code: A Local, Copilot Alternative</h3> </div> </a><a class="sidebar-story" href="https://itsfoss.com/linux-market-share/"> <figure class="sidebar-story__media m-r"> <picture class=""> <source data-srcset="/content/images/size/w100/format/webp/wordpress/2017/09/linux-desktop-market-share.jpg 100w,/content/images/size/w300/format/webp/wordpress/2017/09/linux-desktop-market-share.jpg 300w," data-sizes="auto" type="image/webp" > <img class="lazyload" data-srcset="/content/images/size/w100/wordpress/2017/09/linux-desktop-market-share.jpg 100w,/content/images/size/w300/wordpress/2017/09/linux-desktop-market-share.jpg 300w," srcset="/content/images/size/w30/wordpress/2017/09/linux-desktop-market-share.jpg" data-sizes="auto" data-src="/content/images/size/w100/wordpress/2017/09/linux-desktop-market-share.jpg" src="/content/images/size/w30/wordpress/2017/09/linux-desktop-market-share.jpg" alt="Desktop Linux market share" > </picture> </figure> <div class="sidebar-story__content"> <h3 class="sidebar-story__title">Desktop Linux Market Share: April 2025</h3> </div> </a> </div> <div class="sidebar__section flex flex-cc hide-mobile"> <div align="center" data-freestar-ad="__300x250 __300x600" id="itsfoss_300x250_Sidebar1"> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script data-cfasync="false" type="text/javascript"> freestar.config.enabled_slots.push({ placementName: "itsfoss_300x250_Sidebar1", slotId: "itsfoss_300x250_Sidebar1" }); </script> </div> </div> <span class="section-title sm">Latest</span> <div class="sidebar__section"> <a class="sidebar-story" href="https://itsfoss.com/logseq-format-text/"> <figure class="sidebar-story__media m-r"> <picture class=""> <source data-srcset="/content/images/size/w100/format/webp/2025/04/text-formatting-in-logseq.png 100w,/content/images/size/w300/format/webp/2025/04/text-formatting-in-logseq.png 300w," data-sizes="auto" type="image/webp" > <img class="lazyload" data-srcset="/content/images/size/w100/2025/04/text-formatting-in-logseq.png 100w,/content/images/size/w300/2025/04/text-formatting-in-logseq.png 300w," srcset="/content/images/size/w30/2025/04/text-formatting-in-logseq.png" data-sizes="auto" data-src="/content/images/size/w100/2025/04/text-formatting-in-logseq.png" src="/content/images/size/w30/2025/04/text-formatting-in-logseq.png" alt="Formatting text in logseq" > </picture> </figure> <div class="sidebar-story__content"> <h3 class="sidebar-story__title">Formatting Text in Logseq</h3> <div class="sidebar-story__info"> <time datetime="2025-04-11" class="sidebar-story__date"> 11 Apr 2025 </time> </div> </div> </a><a class="sidebar-story" href="https://itsfoss.com/newsletter/foss-weekly-25-15/"> <figure class="sidebar-story__media m-r"> <picture class=""> <source data-srcset="/content/images/size/w100/format/webp/2025/04/foss-weekly-1.png 100w,/content/images/size/w300/format/webp/2025/04/foss-weekly-1.png 300w," data-sizes="auto" type="image/webp" > <img class="lazyload" data-srcset="/content/images/size/w100/2025/04/foss-weekly-1.png 100w,/content/images/size/w300/2025/04/foss-weekly-1.png 300w," srcset="/content/images/size/w30/2025/04/foss-weekly-1.png" data-sizes="auto" data-src="/content/images/size/w100/2025/04/foss-weekly-1.png" src="/content/images/size/w30/2025/04/foss-weekly-1.png" alt="FOSS Weekly #25.15" > </picture> </figure> <div class="sidebar-story__content"> <h3 class="sidebar-story__title">FOSS Weekly #25.15: Clapgrep, APT 3.0, Vibe Coding, AI in Firefox and More</h3> <div class="sidebar-story__info"> <time datetime="2025-04-10" class="sidebar-story__date"> 10 Apr 2025 </time> </div> </div> </a><a class="sidebar-story" href="https://itsfoss.com/install-logseq-linux/"> <figure class="sidebar-story__media m-r"> <picture class=""> <source data-srcset="/content/images/size/w100/format/webp/2025/04/install-logseq.png 100w,/content/images/size/w300/format/webp/2025/04/install-logseq.png 300w," data-sizes="auto" type="image/webp" > <img class="lazyload" data-srcset="/content/images/size/w100/2025/04/install-logseq.png 100w,/content/images/size/w300/2025/04/install-logseq.png 300w," srcset="/content/images/size/w30/2025/04/install-logseq.png" data-sizes="auto" data-src="/content/images/size/w100/2025/04/install-logseq.png" src="/content/images/size/w30/2025/04/install-logseq.png" alt="Installing Logseq" > </picture> </figure> <div class="sidebar-story__content"> <h3 class="sidebar-story__title">Installing Logseq Knowledge Management Tool on Linux</h3> <div class="sidebar-story__info"> <time datetime="2025-04-07" class="sidebar-story__date"> 07 Apr 2025 </time> </div> </div> </a> </div> <div class="sidebar__section hide-mobile flex flex-cc"> <div class="sidebar__subscribe"> <h4 class="text-acc fw-800"> Become a Better Linux User </h4> <div class="m-b text-acc" id="sidebar-input-label"> With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world </div> <form class="subscribe-form" data-members-form="subscribe" data-style=""> <input data-members-email class="" type="email" autocomplete="email" placeholder="Your email address" aria-labelledby="sidebar-input-label" required> <button class="btn btn--brand" type="submit"> <span>Subscribe</span> </button> <div class="msg-success">Great! Check your inbox and click the link.</div> <div class="msg-error">Sorry, something went wrong. Please try again.</div> </form> </div> </div> <div class="sidebar__section is-sticky flex-direction: column hide-mobile"> <div align="center" data-freestar-ad="__336x280 __336x280" id="itsfoss_300x250_300x600_Sidebar2_new"> <script data-cfasync="false" type="text/javascript"> freestar.config.enabled_slots.push({ placementName: "itsfoss_300x250_300x600_Sidebar2_new", slotId: "itsfoss_300x250_300x600_Sidebar2_new" }); </script> </div> </div> </aside> </div> </div> </div> <div class="container wrapper flex flex-wrap gap-lg m-b-lg"> <div class="post-comments radius-double p-lg p-b-0 flex-1 self-align-start" id="comments"> <script src="https://cdn.fastcomments.com/js/embed-v2.min.js"></script> <div id="fastcomments-widget"></div> <script> (function () { let simpleSSO = null; simpleSSO = { loginURL: '#/portal/signin' } FastCommentsUI(document.getElementById('fastcomments-widget'), { tenantId: "zzbYFZ39cH4", simpleSSO: simpleSSO, url: window.location.origin + window.location.pathname, urlId: window.location.origin + window.location.pathname }); })(); </script> </div> <div class="related-posts radius-double p-lg flex-1 self-align-start"> <span class="section-title sm m-b uppercase">Read next</span> <div class="post-list m-b-sm"> <a class="post-list-item" href="/lvm-guide/"> <h3 class="post-list-item__title">Unlocking the Power of Storage: A Beginner's Guide to LVM in Linux</h3> <i class="icon icon-chevron-right"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <polyline points="9 6 15 12 9 18"></polyline> </svg> </i> </a> <a class="post-list-item" href="/compile-linux-kernel/"> <h3 class="post-list-item__title">A Guide to Compiling the Linux Kernel All By Yourself</h3> <i class="icon icon-chevron-right"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <polyline points="9 6 15 12 9 18"></polyline> </svg> </i> </a> <a class="post-list-item" href="/improve-privacy/"> <h3 class="post-list-item__title">11 Ways to Improve Your Privacy in Online World</h3> <i class="icon icon-chevron-right"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <polyline points="9 6 15 12 9 18"></polyline> </svg> </i> </a> <a class="post-list-item" href="/i3-customization/"> <h3 class="post-list-item__title">The Ultimate Guide to i3 Customization in Linux</h3> <i class="icon icon-chevron-right"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <polyline points="9 6 15 12 9 18"></polyline> </svg> </i> </a> <a class="post-list-item" href="/ufw-ubuntu/"> <h3 class="post-list-item__title">Using Firewall With UFW in Ubuntu Linux [Beginner's Guide]</h3> <i class="icon icon-chevron-right"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <polyline points="9 6 15 12 9 18"></polyline> </svg> </i> </a> </div> </div> </div> </main> <section class="container wrapper section cta m-b-0 is-post" > <div class="cta__inner radius-double is-rel w-100 p-t-lg p-b-lg has-img"> <div class="cta__content flex flex-col is-rel z-index-1"> <h2 class="cta__title">Become a Better Linux User</h2> <p id="cta-input-label" class="cta__description opacity-075">With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world </p> <form class="subscribe-form" data-members-form="signup" data-style="inline-joined"> <input data-members-email class="" type="email" autocomplete="email" placeholder="Your email address" aria-labelledby="cta-input-label" required> <button class="btn btn--brand btn--gradient uppercase" type="submit"> <span>Subscribe</span> </button> <div class="msg-success">Great! Check your inbox and click the link.</div> <div class="msg-error">Sorry, something went wrong. Please try again.</div> </form> </div> <figure class="cta__media"> <img class="lazyload cta__img" src="/assets/images/itsfoss-cta.webp" alt="itsfoss happy penguin"/> </figure> </div> </section> <footer class="footer"> <div class="container wrapper"> <div class="row m-b"> <div class="col-xs-12 col-md-4"> <div class="footer__brand flex items-center"> <picture class=""> <source data-srcset="/content/images/size/w300/format/webp/2023/01/itsfoss-logo.png 300w," data-sizes="auto" type="image/webp" > <img class="footer__logo m-r lazyload" data-srcset="/content/images/size/w300/2023/01/itsfoss-logo.png 300w," srcset="/content/images/size/w30/2023/01/itsfoss-logo.png" data-sizes="auto" data-src="/content/images/size/w100/2023/01/itsfoss-logo.png" src="/content/images/size/w30/2023/01/itsfoss-logo.png" alt="It's FOSS" > </picture> </div> <div class="footer__description" id="footer-input-label"> Making You a Better Linux User </div> <form class="subscribe-form radius-rounded m-b" data-members-form="subscribe" data-style="inline-joined"> <input data-members-email class="w-100 radius-rounded" type="email" autocomplete="email" placeholder="Your email address" aria-labelledby="footer-input-label" required> <button class="btn btn--primary radius-rounded" type="submit"> <span>Subscribe</span> </button> <div class="msg-success">Great! Check your inbox and click the link.</div> <div class="msg-error">Sorry, something went wrong. Please try again.</div> </form> </div> <div class="col-xs-12 col-md-4 m-b footer-nav"> <span class="fw-700 m-b-sm display-block text-acc">Navigation</span> <div class="grid col-2"> <ul class="nav"> <li class="nav-news" data-label="📰 News" data-length="7"> <a href="https://news.itsfoss.com/"> <span>📰 News</span> </a> </li> <li class="nav-newsletter" data-label="📬 Newsletter" data-length="13"> <a href="https://itsfoss.com/newsletter/"> <span>📬 Newsletter</span> </a> </li> <li class="nav-quizzes-puzzles" data-label="🧩 Quizzes & Puzzles" data-length="20"> <a href="https://itsfoss.com/quiz/"> <span>🧩 Quizzes & Puzzles</span> </a> </li> <li class="nav-resources" data-label="🎒 Resources" data-length="12"> <a href="https://itsfoss.com/resources/"> <span>🎒 Resources</span> </a> </li> <li class="nav-community" data-label="🏘️ Community" data-length="13"> <a href="https://itsfoss.community/"> <span>🏘️ Community</span> </a> </li> <li class="nav-about" data-label="📖 About" data-length="8"> <a href="https://itsfoss.com/about/"> <span>📖 About</span> </a> </li> <li class="nav-contact is-subitem" data-label="-🪪 Contact" data-length="11"> <a href="https://itsfoss.com/contact-us/"> <span>-🪪 Contact</span> </a> </li> <li class="nav-policies is-subitem" data-label="-📜 Policies" data-length="12"> <a href="https://itsfoss.com/policies/"> <span>-📜 Policies</span> </a> </li> </ul> <ul class="nav secondary submenu"> <li class="nav-linux-server-side" data-label="Linux Server Side" data-length="17"> <a href="https://linuxhandbook.com/"> <span>Linux Server Side</span> </a> </li> <li class="nav-en-espanol" data-label="En Español" data-length="10"> <a href="https://itsfoss.com/es/"> <span>En Español</span> </a> </li> <li class="nav-feedback" data-label="🗳️ Feedback" data-length="12"> <a href="https://itsfoss.com/update-feedback/"> <span>🗳️ Feedback</span> </a> </li> <li class="nav-impressum" data-label="Impressum" data-length="9"> <a href="https://itsfoss.com/impressum/"> <span>Impressum</span> </a> </li> <li class="nav-terms-of-use" data-label="Terms of use" data-length="12"> <a href="https://itsfoss.com/terms/"> <span>Terms of use</span> </a> </li> </ul> </div> </div> <div class="col-xs-12 col-sm-6 col-md-2 m-b"> <span class="fw-700 m-b-sm display-block text-acc">Resources</span> <ul class="nav"> <li><a href="/tag/courses/">Courses 🎓</a></li> <li><a href="/tag/distro-resources/">Distro Resources 📖</a></li> <li><a href="/tag/guides/">Guides 📒</a></li> </ul> </div> <div class="col-xs-12 col-sm-6 col-md-2 m-b"> <span class="fw-700 m-b-sm display-block text-acc">Social</span> <div class="social-links flex flex-col"> <a href="https://www.facebook.com/itsfoss" class="facebook" aria-label="Facebook"><i class="icon icon-facebook icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-facebook" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3" /> </svg> </i><span>Facebook</span></a> <a href="https://twitter.com/itsfoss2" class="twitter" aria-label="Twitter"><i class="icon icon-twitter-x icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M4 4l11.733 16h4.267l-11.733 -16z"></path> <path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"></path> </svg> </i><span>Twitter</span></a> <a href="https://itsfoss.com/rss/" class="rss" aria-label="RSS"><i class="icon icon-rss icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-rss" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <circle cx="5" cy="19" r="1" /> <path d="M4 4a16 16 0 0 1 16 16" /> <path d="M4 11a9 9 0 0 1 9 9" /> </svg> </i><span>RSS</span></a> <a href="https://www.instagram.com/itsfoss/" class="instagram" aria-label="Instagram"><i class="icon icon-instagram icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-instagram" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <desc>Download more icon variants from https://tabler-icons.io/i/brand-instagram</desc> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <rect x="4" y="4" width="16" height="16" rx="4" /> <circle cx="12" cy="12" r="3" /> <line x1="16.5" y1="7.5" x2="16.5" y2="7.501" /> </svg> </i><span>Instagram</span></a> <a href="https://t.me/itsfoss_official" class="telegram" aria-label="Telegram"><i class="icon icon-telegram icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-telegram" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <desc>Download more icon variants from https://tabler-icons.io/i/brand-telegram</desc> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4" /> </svg> </i><span>Telegram</span></a> <a href="https://www.youtube.com/@Itsfoss" class="youtube" aria-label="Youtube"><i class="icon icon-youtube icon--sm"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-youtube" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <desc>Download more icon variants from https://tabler-icons.io/i/brand-youtube</desc> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <rect x="3" y="5" width="18" height="14" rx="4" /> <path d="M10 9l5 3l-5 3z" /> </svg> </i><span>Youtube</span></a> </div> </div> </div> <div class="footer__bottom"> <div class="footer__copy"> <span>©2025 <a href="https://itsfoss.com">It's FOSS</a>.</span> <span>Hosted on <a href="https://digitalocean.pxf.io/JzK74r">Digital Ocean</a> & Published with <a href="https://ghost.org/pricing/?via=abhishek70">Ghost</a> & <a href="https://brightthemes.lemonsqueezy.com/?aff=GNoD0">Rinne</a>.</span> </div> <div class="color-scheme flex flex-cc radius-half"> <div class="color-scheme-symbol"> <span class="accent-bg"></span> </div> <select class="color-scheme-select radius-half js-color-scheme-select" aria-label="Change color scheme"> <option value="system" selected>System</option> <option value="light">Light</option> <option value="dark">Dark</option> </select> <i class="icon icon-select"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-select" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path d="M17 8.517L12 3 7 8.517M7 15.48l5 5.517 5-5.517"></path> </svg> </i></div> </div> </div> </footer> <dialog class="notification"> <i class="icon icon-success notification-icon"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <circle cx="12" cy="12" r="9" /> <path d="M9 12l2 2l4 -4" /> </svg> </i> <i class="icon icon-error notification-icon"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-alert-octagon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M8.7 3h6.6c.3 0 .5 .1 .7 .3l4.7 4.7c.2 .2 .3 .4 .3 .7v6.6c0 .3 -.1 .5 -.3 .7l-4.7 4.7c-.2 .2 -.4 .3 -.7 .3h-6.6c-.3 0 -.5 -.1 -.7 -.3l-4.7 -4.7c-.2 -.2 -.3 -.4 -.3 -.7v-6.6c0 -.3 .1 -.5 .3 -.7l4.7 -4.7c.2 -.2 .4 -.3 .7 -.3z" /> <line x1="12" y1="8" x2="12" y2="12" /> <line x1="12" y1="16" x2="12.01" y2="16" /> </svg> </i> <i class="icon icon-warning notification-icon"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-alert-triangle" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M12 9v2m0 4v.01" /> <path d="M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75" /> </svg> </i> <p class="notification-msg signup-success">Great! You’ve successfully signed up.</p> <p class="notification-msg signin-success">Welcome back! You've successfully signed in.</p> <p class="notification-msg subscribe-success">You've successfully subscribed to It's FOSS.</p> <p class="notification-msg link-expired">Your link has expired.</p> <p class="notification-msg checkout-success">Success! Check your email for magic link to sign-in.</p> <p class="notification-msg billing-success">Success! Your billing info has been updated.</p> <p class="notification-msg billing-cancel">Your billing was not updated.</p> <button class="notification-close js-notification-close" aria-label="Close" onclick="closeNotification(event.currentTarget.parentNode);"> <i class="icon icon-x"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <line x1="18" y1="6" x2="6" y2="18" /> <line x1="6" y1="6" x2="18" y2="18" /> </svg> </i> </button> </dialog> <script> document.addEventListener('readystatechange', function(event) { if (document.readyState === "complete") { // table of contents toggle const tocToggleBtn = document.querySelector('.js-toc-toggle'); const postToc = document.querySelector('.js-post-toc'); // media query for TOC function const mqSmall = window.matchMedia('(max-width: 767px)'); const mqLarge = window.matchMedia('(min-width: 768px)'); if (tocToggleBtn && postToc) { // if device is large, show the TOC by default if (mqLarge.matches) postToc.classList.add('is-active'); // open/close the TOC tocToggleBtn.onclick = function(event) { postToc.classList.toggle('is-active'); } } // get header height as threshold const headerHeight = parseInt(getComputedStyle(document.documentElement) .getPropertyValue('--global-header-height')); const headerStyle = document.querySelector('.js-header').getAttribute('data-header'); let headerOffset = headerStyle === 'normal' ? 20 : headerHeight + 20; if (postToc) { tocbot.init({ // Where to render the table of contents. tocSelector: '.js-toc', // Where to grab the headings to build the table of contents. contentSelector: '.content', // Which headings to grab inside of the contentSelector element. headingSelector: 'h1, h2, h3, h4', // Ignore some headings (like header card and toggle card) ignoreSelector: '[class*="kg-"],[class*="content-cta"]', // For headings inside relative or absolute positioned containers within content. hasInnerContainers: false, // smooth scroll scrollSmooth: false, // offset headingsOffset: headerOffset, // onclick event /*onClick: function(e){ e.preventDefault(); const href = this.getAttribute('href'); if (href) { const el = document.querySelector(`#${CSS.escape(href.substring(1))}`); let offset; const bodyRect = document.body.getBoundingClientRect().top; const elementRect = el.getBoundingClientRect().top; const elementPosition = elementRect - bodyRect; offset = headerOffset; themeGlobal.scrollPos = elementPosition; const offsetPosition = elementPosition - offset; window.scrollTo({ top: offsetPosition, behavior: 'smooth' }); } // if on small screen close the TOC when clicking on item if (mqSmall.matches) postToc.classList.remove('is-active'); }*/ }); document.querySelector('.js-toc .toc-list') ? postToc.classList.add('is-rendered') : null; } } }); </script> <script> // Copy button const copyBtn = document.querySelector('.js-copy-link'); if (copyBtn) { copyBtn.onclick = function(event) { copyToClipboard(event.currentTarget, event.currentTarget.getAttribute('data-url')); } } /** * Copy to clipboard * @src - source element * @str - string to copy */ const copyToClipboard = function(src, str) { const el = document.createElement('textarea'); el.value = str; el.setAttribute('readonly', ''); el.style.position = 'absolute'; el.style.left = '-9999px'; document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el); src.classList.add('has-tooltip'); src.setAttribute('data-label', 'Copied!'); src.onmouseleave = function() { src.classList.remove('has-tooltip'); setTimeout(function(){ src.setAttribute('data-label', ''); }, 500); } }; </script> <script> const navItems = document.querySelectorAll('.header .nav:not(.submenu) li, .menu .nav:not(.submenu) li') const allNavItems = document.querySelectorAll('.is-subitem') // Remove '-' signs allNavItems.forEach(item => { const itemName = item.querySelector('a span') itemName.innerText = itemName.innerText.slice(1) }); // Add subitems in place let subMenu, hasItems navItems.forEach((item, index) => { if (item.classList.contains('is-subitem') && !navItems[index - 1].classList.contains('is-subitem')) navItems[index - 1].classList.add('is-mainitem'); subMenu = item.classList.contains('is-subitem') ? subMenu : document.createElement('ul'); if (item.classList.contains('is-subitem')) { subMenu.appendChild(item) subMenu.classList.add('nav','submenu') } else { item.appendChild(subMenu) } }); </script> <script> const submenus = document.querySelectorAll('.menu .is-mainitem') const toggle = document.querySelector('[data-toggle-template]'); submenus.forEach(menu => { const toggleBtn = toggle.content.cloneNode(true); menu.appendChild(toggleBtn); }); </script> <script> // Give the parameter a variable name const qsParams = new URLSearchParams(window.location.search); const isAction = qsParams.has('action'); const isStripe = qsParams.has('stripe'); const success = qsParams.get('success'); const action = qsParams.get('action'); const stripe = qsParams.get('stripe'); if (qsParams && isAction) { if (success === "true") { switch (action) { case 'subscribe': openNotification('subscribe-success'); break; case 'signup': openNotification('signup-success'); break; case 'signin': openNotification('signin-success'); break; default: break; } } else { openNotification('link-expired'); } } if (qsParams && isStripe) { switch (stripe) { case 'success': openNotification('checkout-success'); break; case 'billing-update-success': openNotification('billing-success'); break; case 'billing-update-cancel': openNotification('billing-cancel'); break; default: break; } } /** * Handle Notifications */ function openNotification(type) { const notification = document.querySelector('dialog.notification'); if (notification) { notification.setAttribute('data-msg-type', type); notification.show(); setTimeout(function(){ closeNotification(notification); }, 3000); } } /** * Clean URI */ function clearURI() { window.history.replaceState({}, '', `${window.location.pathname}`); } function closeNotification(notification) { notification.close(); clearURI(); setTimeout(function(){ notification.removeAttribute('data-msg-type') }, 500); } </script> <script src="https://talk.hyvor.com/embed/comment-counts.js"></script> <script> hyvorTalkCommentCounts.load({ "website-id": 8243 }) </script> <script> Contextly.ready('widgets'); </script> <!-- HTML for geo depending button --> <button id="pmLink">Privacy Manager</button> <!-- Blockthrough script --> <script type="text/javascript" async src="https://btloader.com/tag?o=5714937848528896&upapi=true"></script> <!-- This site is converting visitors into subscribers and customers with OptinMonster - https://optinmonster.com --> <script>(function(d,u,ac){var s=d.createElement('script');s.type='text/javascript';s.src='https://a.omappapi.com/app/js/api.min.js';s.async=true;s.dataset.user=u;s.dataset.account=ac;d.getElementsByTagName('head')[0].appendChild(s);})(document,333364,352958);</script> <!-- / https://optinmonster.com --> </body> </html>