{
    "componentChunkName": "component---src-templates-blog-post-js",
    "path": "/docs/tips/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linuxdev Documentation","social":{"disqusShortName":"kennyyeoyounet"}}},"markdownRemark":{"id":"26ed2d5f-1b79-5597-ba0f-d359b2796529","excerpt":"Tips Useful Commands  to shut down the VM  to turn on the VM  apply .env settings like MEMORY, CPUS with rebooting vm  to destroy the VM and start from scratch…","html":"<h1 id=\"tips\" style=\"position:relative;\" class=\"title\"><a href=\"#tips\" aria-label=\"tips permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Tips</h1>\n<h2 id=\"useful-commands\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#useful-commands\" aria-label=\"useful commands permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Useful Commands</h2>\n<ul>\n<li><code class=\"language-text\">vagrant halt</code> to shut down the VM</li>\n<li><code class=\"language-text\">vagrant up</code> to turn on the VM</li>\n<li><code class=\"language-text\">vagrant reload</code> apply .env settings like MEMORY, CPUS with <strong>rebooting vm</strong></li>\n<li><code class=\"language-text\">./destory.sh</code> to destroy the VM and start from scratch</li>\n</ul>\n<p>If you want to repeat from scratch for some reason, you can run <code class=\"language-text\">./destroy.sh</code> and retry <code class=\"language-text\">bootstrap.sh</code>.</p>\n<h2 id=\"docker\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#docker\" aria-label=\"docker permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Docker</h2>\n<p>docker is available and you will see the samba container running for the VM</p>\n<p>Please use install-docker-clients script if you don’t have docker clients installed.</p>\n<p><a href=\"https://www.vagrantmanager.com/\">Vagrant Manager</a> would be nice to have. Try setup.ps1 with <code class=\"language-text\">-withvagrantmanager</code></p>\n<h2 id=\"mapping-network-drive-from-the-machine\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#mapping-network-drive-from-the-machine\" aria-label=\"mapping network drive from the machine permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Mapping network drive from the machine</h2>\n<p>Virtualbox machine has IP of 192.168.99.123 by default\nand it shares Projects directory so Host machine can see the files in it.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">\\\\192.168.99.123\\Projects</code></pre></div>\n<p>** Windows git global config should have filemode turned off</p>\n<h2 id=\"setup-parameters\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#setup-parameters\" aria-label=\"setup parameters permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup parameters</h2>\n<div class=\"gatsby-highlight\" data-language=\"powershell\"><pre class=\"language-powershell\"><code class=\"language-powershell\"><span class=\"token punctuation\">.</span>\\setup<span class=\"token punctuation\">.</span>ps1 <span class=\"token operator\">-</span>nodevtools</code></pre></div>\n<p>or</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">./setup.sh --no-devtools</code></pre></div>\n<p>will skip installing git(for Mac), vscode, and terminal.</p>\n<p><code class=\"language-text\">--no-{vscode,git,vagrant,virtualbox,...}</code> is also available</p>\n<p>** git should be required for Windows to run git-bash</p>\n<h3 id=\"basic-os-setting\" style=\"position:relative;\"><a href=\"#basic-os-setting\" aria-label=\"basic os setting permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>basic os setting</h3>\n<p><code class=\"language-text\">-withosconfig</code> will update registry for</p>\n<ul>\n<li>Disable Secure Desktop (UAC Dimming)</li>\n<li>Set active hour (8am to 2am)</li>\n<li>Show hidden files and extensions</li>\n<li>Disable Windows Update</li>\n</ul>\n<p>You can also run separately by <code class=\"language-text\">scripts/basic-config.ps1</code></p>\n<h2 id=\"docker-storage\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#docker-storage\" aria-label=\"docker storage permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Docker Storage</h2>\n<p>Docker tend to use many small files especially for node.js projects</p>\n<p>If the main storage has not enough inodes, docker can fail because of the disk space.\nYou can check that <code class=\"language-text\">df -h</code> has some free space but <code class=\"language-text\">df -hi</code> shows a low free space.</p>\n<p>BTW, You can prune unused file by following docker command but it would rebuild required files soon.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">docker system prune --volumes</code></pre></div>\n<p>This vgrantfile has additional space file of 40GB and it can be configured by <code class=\"language-text\">DOCKER_DISK_SIZE_GB=40</code></p>\n<h2 id=\"details-for-windows-10-users\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#details-for-windows-10-users\" aria-label=\"details for windows 10 users permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Details For Windows 10 users</h2>\n<h3 id=\"setupps1\" style=\"position:relative;\"><a href=\"#setupps1\" aria-label=\"setupps1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>setup.ps1</h3>\n<blockquote>\n<p>:warning: <strong>Note that this script will disable WSL2(Hyper-V).</strong></p>\n<p>Please backup any required files before running. Docker will be still available by this VM</p>\n</blockquote>\n<p>Right click windows menu and click Windows Powershell (Admin)</p>\n<div class=\"gatsby-highlight\" data-language=\"powershell\"><pre class=\"language-powershell\"><code class=\"language-powershell\"><span class=\"token function\">Set-ExecutionPolicy</span> <span class=\"token operator\">-</span>Scope <span class=\"token keyword\">Process</span> <span class=\"token operator\">-</span>ExecutionPolicy Bypass</code></pre></div>\n<p>Run the setup script in the directory of this repo</p>\n<div class=\"gatsby-highlight\" data-language=\"powershell\"><pre class=\"language-powershell\"><code class=\"language-powershell\">\\Users\\xxx\\linuxdev\\setup<span class=\"token punctuation\">.</span>ps1</code></pre></div>\n<p>** Running setup script again will check updates and install if newer version found</p>\n<h3 id=\"bootstrapsh\" style=\"position:relative;\"><a href=\"#bootstrapsh\" aria-label=\"bootstrapsh permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>bootstrap.sh</h3>\n<p>Open Windows Terminal for Gitbash or just Git Bash</p>\n<p>In linuxdev dir (this repo)</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">./bootstrap.sh</code></pre></div>\n<p>This will create virtualbox machine and bootup and config</p>","fields":{"slug":"/docs/tips/","language":""},"frontmatter":{"title":"Tips","date":"September 26, 2021","description":null}},"previous":null,"next":{"fields":{"slug":"/ko/docs/tips/"},"frontmatter":{"title":"Tips"}}},"pageContext":{"id":"26ed2d5f-1b79-5597-ba0f-d359b2796529","previousPostId":null,"nextPostId":"16173aa3-0137-5eaa-93c4-254d42a584b3","language":"en","i18n":{"language":"en","languages":["en","ko","ja"],"defaultLanguage":"en","generateDefaultLanguagePage":false,"routed":false,"originalPath":"/docs/tips/","path":"/docs/tips/"}}},
    "staticQueryHashes": ["2355076697","3347749741"]}