index.html 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776
  1. <!DOCTYPE html>
  2. <html lang="en-us">
  3. <head>
  4. <title>
  5. Move /home Folder | codeskraps
  6. </title>
  7. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <meta name="description" content="Mobile development blog by Carles Sentis, sharing expertise in Android, iOS, and Kotlin Multiplatform development">
  10. <meta name="generator" content="Hugo 0.145.0">
  11. <link rel="canonical" href="https://codeskraps.com/posts/2025/move_home_folder/" >
  12. <link href="/css/style.min.ef8e99489b0b85e34523800e588426b1b4c05e27adcb9d7193952cef205afe6d.css" rel="stylesheet">
  13. <script defer src="https://umami.codeskraps.com/script.js" data-website-id="a80a52da-0b7d-4faf-9dfc-ee6ca5a8421f"></script>
  14. <link rel="stylesheet" href="/css/code-copy.css">
  15. <script defer src="/js/code-copy.js"></script>
  16. </head>
  17. <body>
  18. <div class="flexWrapper">
  19. <header class="headerWrapper">
  20. <div class="header">
  21. <div>
  22. <a class="terminal" href="https://codeskraps.com/">
  23. <span>me@codeskraps.com ~ $</span>
  24. </a>
  25. </div>
  26. <input class="side-menu" type="checkbox" id="side-menu">
  27. <label class="hamb" for="side-menu"><span class="hamb-line"></span></label>
  28. <nav class="headerLinks">
  29. <ul>
  30. <li>
  31. <a href="https://codeskraps.com/posts/" title="" >
  32. ~/posts</a>
  33. </li>
  34. <li>
  35. <a href="https://codeskraps.com/projects/" title="" >
  36. ~/projects</a>
  37. </li>
  38. <li>
  39. <a href="https://codeskraps.com/about/" title="" >
  40. ~/about</a>
  41. </li>
  42. </ul>
  43. </nav>
  44. </div>
  45. </header>
  46. <div class="content">
  47. <main class="main">
  48. <div class="postWrapper">
  49. <h1>Move /home Folder</h1>
  50. <section class="postMetadata">
  51. <dl>
  52. <dt>tags</dt>
  53. <dd><span></span>
  54. <a href="/tags/linux/">#Linux</a></dd>
  55. <dt>published</dt>
  56. <dd><time datetime="2025-01-29">January 29, 2025</time></dd>
  57. <dt>reading time</dt>
  58. <dd>2 minutes</dd>
  59. </dl>
  60. </section>
  61. <div>
  62. <p>You can move the <code>/home</code> folder on Ubuntu, but you must do it carefully to avoid breaking your system. Below are the steps to safely move <code>/home</code> to a new location.</p>
  63. <hr>
  64. <h2 id="1-create-a-backup-recommended"><strong>1. Create a Backup (Recommended)</strong></h2>
  65. <p>Before proceeding, create a backup of your home folder in case anything goes wrong.</p>
  66. <style>
  67. .code-block-container {
  68. position: relative;
  69. margin: 1em 0;
  70. border: 1px solid #5E5E5E;
  71. border-radius: 1px;
  72. overflow: hidden;
  73. }
  74. .code-header {
  75. position: absolute;
  76. top: 8px;
  77. right: 8px;
  78. z-index: 999;
  79. }
  80. .copy-button {
  81. display: inline-flex;
  82. align-items: center;
  83. background: #2d2d2d;
  84. color: white;
  85. border: 1px solid #404040;
  86. border-radius: 4px;
  87. padding: 4px 8px;
  88. font-size: 0.8em;
  89. cursor: pointer;
  90. transition: all 0.2s ease;
  91. }
  92. .copy-button:hover {
  93. background: #404040;
  94. }
  95. .copy-button svg {
  96. width: 14px;
  97. height: 14px;
  98. margin-right: 4px;
  99. }
  100. .tooltip {
  101. position: absolute;
  102. top: -30px;
  103. left: 50%;
  104. transform: translateX(-50%);
  105. background: black;
  106. color: white;
  107. padding: 4px 8px;
  108. border-radius: 4px;
  109. font-size: 12px;
  110. display: none;
  111. }
  112. .tooltip::after {
  113. content: "";
  114. position: absolute;
  115. top: 100%;
  116. left: 50%;
  117. transform: translateX(-50%);
  118. border: 5px solid transparent;
  119. border-top-color: black;
  120. }
  121. .copy-button.copied .tooltip {
  122. display: block;
  123. }
  124. .code-content {
  125. margin: 0;
  126. padding: 0;
  127. }
  128. .code-content pre {
  129. margin: 0;
  130. padding: 10px;
  131. }
  132. </style>
  133. <div class="code-block-container" data-lang="bash">
  134. <div class="code-header">
  135. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  136. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  137. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  138. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  139. </svg>
  140. <span>Copy</span>
  141. <div class="tooltip">Copied!</div>
  142. </button>
  143. </div>
  144. <div class="code-content">
  145. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo tar -czvf /home_backup.tar.gz /home</span></span></code></pre></div>
  146. </div>
  147. </div>
  148. <script>
  149. function copyCodeBlock(button) {
  150. const container = button.closest('.code-block-container');
  151. const codeContent = container.querySelector('.code-content pre');
  152. const code = codeContent.textContent;
  153. navigator.clipboard.writeText(code.trim()).then(() => {
  154. button.classList.add('copied');
  155. setTimeout(() => {
  156. button.classList.remove('copied');
  157. }, 2000);
  158. }).catch(err => {
  159. console.error('Failed to copy:', err);
  160. const textarea = document.createElement('textarea');
  161. textarea.value = code.trim();
  162. document.body.appendChild(textarea);
  163. textarea.select();
  164. try {
  165. document.execCommand('copy');
  166. button.classList.add('copied');
  167. setTimeout(() => {
  168. button.classList.remove('copied');
  169. }, 2000);
  170. } catch (e) {
  171. console.error('Fallback failed:', e);
  172. }
  173. document.body.removeChild(textarea);
  174. });
  175. }
  176. </script>
  177. <h2 id="2-create-a-new-partition-or-mount-point-if-needed"><strong>2. Create a New Partition or Mount Point (If Needed)</strong></h2>
  178. <p>If you&rsquo;re moving /home to a different partition or disk, make sure it&rsquo;s properly formatted and mounted.</p>
  179. <p>For example, if you want to use a new disk (e.g., <code>/dev/sdb1</code>):</p>
  180. <style>
  181. .code-block-container {
  182. position: relative;
  183. margin: 1em 0;
  184. border: 1px solid #5E5E5E;
  185. border-radius: 1px;
  186. overflow: hidden;
  187. }
  188. .code-header {
  189. position: absolute;
  190. top: 8px;
  191. right: 8px;
  192. z-index: 999;
  193. }
  194. .copy-button {
  195. display: inline-flex;
  196. align-items: center;
  197. background: #2d2d2d;
  198. color: white;
  199. border: 1px solid #404040;
  200. border-radius: 4px;
  201. padding: 4px 8px;
  202. font-size: 0.8em;
  203. cursor: pointer;
  204. transition: all 0.2s ease;
  205. }
  206. .copy-button:hover {
  207. background: #404040;
  208. }
  209. .copy-button svg {
  210. width: 14px;
  211. height: 14px;
  212. margin-right: 4px;
  213. }
  214. .tooltip {
  215. position: absolute;
  216. top: -30px;
  217. left: 50%;
  218. transform: translateX(-50%);
  219. background: black;
  220. color: white;
  221. padding: 4px 8px;
  222. border-radius: 4px;
  223. font-size: 12px;
  224. display: none;
  225. }
  226. .tooltip::after {
  227. content: "";
  228. position: absolute;
  229. top: 100%;
  230. left: 50%;
  231. transform: translateX(-50%);
  232. border: 5px solid transparent;
  233. border-top-color: black;
  234. }
  235. .copy-button.copied .tooltip {
  236. display: block;
  237. }
  238. .code-content {
  239. margin: 0;
  240. padding: 0;
  241. }
  242. .code-content pre {
  243. margin: 0;
  244. padding: 10px;
  245. }
  246. </style>
  247. <div class="code-block-container" data-lang="bash">
  248. <div class="code-header">
  249. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  250. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  251. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  252. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  253. </svg>
  254. <span>Copy</span>
  255. <div class="tooltip">Copied!</div>
  256. </button>
  257. </div>
  258. <div class="code-content">
  259. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo mkfs.ext4 /dev/sdb1
  260. </span></span><span style="display:flex;"><span>sudo mkdir /mnt/newhome
  261. </span></span><span style="display:flex;"><span>sudo mount /dev/sdb1 /mnt/newhome</span></span></code></pre></div>
  262. </div>
  263. </div>
  264. <script>
  265. function copyCodeBlock(button) {
  266. const container = button.closest('.code-block-container');
  267. const codeContent = container.querySelector('.code-content pre');
  268. const code = codeContent.textContent;
  269. navigator.clipboard.writeText(code.trim()).then(() => {
  270. button.classList.add('copied');
  271. setTimeout(() => {
  272. button.classList.remove('copied');
  273. }, 2000);
  274. }).catch(err => {
  275. console.error('Failed to copy:', err);
  276. const textarea = document.createElement('textarea');
  277. textarea.value = code.trim();
  278. document.body.appendChild(textarea);
  279. textarea.select();
  280. try {
  281. document.execCommand('copy');
  282. button.classList.add('copied');
  283. setTimeout(() => {
  284. button.classList.remove('copied');
  285. }, 2000);
  286. } catch (e) {
  287. console.error('Fallback failed:', e);
  288. }
  289. document.body.removeChild(textarea);
  290. });
  291. }
  292. </script>
  293. <h2 id="3-copy-the-home-folder"><strong>3. Copy the Home Folder</strong></h2>
  294. <p>Copy all user data to the new location while preserving permissions:</p>
  295. <style>
  296. .code-block-container {
  297. position: relative;
  298. margin: 1em 0;
  299. border: 1px solid #5E5E5E;
  300. border-radius: 1px;
  301. overflow: hidden;
  302. }
  303. .code-header {
  304. position: absolute;
  305. top: 8px;
  306. right: 8px;
  307. z-index: 999;
  308. }
  309. .copy-button {
  310. display: inline-flex;
  311. align-items: center;
  312. background: #2d2d2d;
  313. color: white;
  314. border: 1px solid #404040;
  315. border-radius: 4px;
  316. padding: 4px 8px;
  317. font-size: 0.8em;
  318. cursor: pointer;
  319. transition: all 0.2s ease;
  320. }
  321. .copy-button:hover {
  322. background: #404040;
  323. }
  324. .copy-button svg {
  325. width: 14px;
  326. height: 14px;
  327. margin-right: 4px;
  328. }
  329. .tooltip {
  330. position: absolute;
  331. top: -30px;
  332. left: 50%;
  333. transform: translateX(-50%);
  334. background: black;
  335. color: white;
  336. padding: 4px 8px;
  337. border-radius: 4px;
  338. font-size: 12px;
  339. display: none;
  340. }
  341. .tooltip::after {
  342. content: "";
  343. position: absolute;
  344. top: 100%;
  345. left: 50%;
  346. transform: translateX(-50%);
  347. border: 5px solid transparent;
  348. border-top-color: black;
  349. }
  350. .copy-button.copied .tooltip {
  351. display: block;
  352. }
  353. .code-content {
  354. margin: 0;
  355. padding: 0;
  356. }
  357. .code-content pre {
  358. margin: 0;
  359. padding: 10px;
  360. }
  361. </style>
  362. <div class="code-block-container" data-lang="bash">
  363. <div class="code-header">
  364. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  365. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  366. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  367. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  368. </svg>
  369. <span>Copy</span>
  370. <div class="tooltip">Copied!</div>
  371. </button>
  372. </div>
  373. <div class="code-content">
  374. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo rsync -aXS /home/ /mnt/newhome/</span></span></code></pre></div>
  375. </div>
  376. </div>
  377. <script>
  378. function copyCodeBlock(button) {
  379. const container = button.closest('.code-block-container');
  380. const codeContent = container.querySelector('.code-content pre');
  381. const code = codeContent.textContent;
  382. navigator.clipboard.writeText(code.trim()).then(() => {
  383. button.classList.add('copied');
  384. setTimeout(() => {
  385. button.classList.remove('copied');
  386. }, 2000);
  387. }).catch(err => {
  388. console.error('Failed to copy:', err);
  389. const textarea = document.createElement('textarea');
  390. textarea.value = code.trim();
  391. document.body.appendChild(textarea);
  392. textarea.select();
  393. try {
  394. document.execCommand('copy');
  395. button.classList.add('copied');
  396. setTimeout(() => {
  397. button.classList.remove('copied');
  398. }, 2000);
  399. } catch (e) {
  400. console.error('Fallback failed:', e);
  401. }
  402. document.body.removeChild(textarea);
  403. });
  404. }
  405. </script>
  406. <hr>
  407. <h2 id="4-update-fstab"><strong>4. Update fstab</strong></h2>
  408. <p>Edit /etc/fstab to mount the new home directory at boot.</p>
  409. <style>
  410. .code-block-container {
  411. position: relative;
  412. margin: 1em 0;
  413. border: 1px solid #5E5E5E;
  414. border-radius: 1px;
  415. overflow: hidden;
  416. }
  417. .code-header {
  418. position: absolute;
  419. top: 8px;
  420. right: 8px;
  421. z-index: 999;
  422. }
  423. .copy-button {
  424. display: inline-flex;
  425. align-items: center;
  426. background: #2d2d2d;
  427. color: white;
  428. border: 1px solid #404040;
  429. border-radius: 4px;
  430. padding: 4px 8px;
  431. font-size: 0.8em;
  432. cursor: pointer;
  433. transition: all 0.2s ease;
  434. }
  435. .copy-button:hover {
  436. background: #404040;
  437. }
  438. .copy-button svg {
  439. width: 14px;
  440. height: 14px;
  441. margin-right: 4px;
  442. }
  443. .tooltip {
  444. position: absolute;
  445. top: -30px;
  446. left: 50%;
  447. transform: translateX(-50%);
  448. background: black;
  449. color: white;
  450. padding: 4px 8px;
  451. border-radius: 4px;
  452. font-size: 12px;
  453. display: none;
  454. }
  455. .tooltip::after {
  456. content: "";
  457. position: absolute;
  458. top: 100%;
  459. left: 50%;
  460. transform: translateX(-50%);
  461. border: 5px solid transparent;
  462. border-top-color: black;
  463. }
  464. .copy-button.copied .tooltip {
  465. display: block;
  466. }
  467. .code-content {
  468. margin: 0;
  469. padding: 0;
  470. }
  471. .code-content pre {
  472. margin: 0;
  473. padding: 10px;
  474. }
  475. </style>
  476. <div class="code-block-container" data-lang="bash">
  477. <div class="code-header">
  478. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  479. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  480. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  481. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  482. </svg>
  483. <span>Copy</span>
  484. <div class="tooltip">Copied!</div>
  485. </button>
  486. </div>
  487. <div class="code-content">
  488. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo nano /etc/fstab</span></span></code></pre></div>
  489. </div>
  490. </div>
  491. <script>
  492. function copyCodeBlock(button) {
  493. const container = button.closest('.code-block-container');
  494. const codeContent = container.querySelector('.code-content pre');
  495. const code = codeContent.textContent;
  496. navigator.clipboard.writeText(code.trim()).then(() => {
  497. button.classList.add('copied');
  498. setTimeout(() => {
  499. button.classList.remove('copied');
  500. }, 2000);
  501. }).catch(err => {
  502. console.error('Failed to copy:', err);
  503. const textarea = document.createElement('textarea');
  504. textarea.value = code.trim();
  505. document.body.appendChild(textarea);
  506. textarea.select();
  507. try {
  508. document.execCommand('copy');
  509. button.classList.add('copied');
  510. setTimeout(() => {
  511. button.classList.remove('copied');
  512. }, 2000);
  513. } catch (e) {
  514. console.error('Fallback failed:', e);
  515. }
  516. document.body.removeChild(textarea);
  517. });
  518. }
  519. </script>
  520. <p>Add this line at the end (adjust the path accordingly):</p>
  521. <style>
  522. .code-block-container {
  523. position: relative;
  524. margin: 1em 0;
  525. border: 1px solid #5E5E5E;
  526. border-radius: 1px;
  527. overflow: hidden;
  528. }
  529. .code-header {
  530. position: absolute;
  531. top: 8px;
  532. right: 8px;
  533. z-index: 999;
  534. }
  535. .copy-button {
  536. display: inline-flex;
  537. align-items: center;
  538. background: #2d2d2d;
  539. color: white;
  540. border: 1px solid #404040;
  541. border-radius: 4px;
  542. padding: 4px 8px;
  543. font-size: 0.8em;
  544. cursor: pointer;
  545. transition: all 0.2s ease;
  546. }
  547. .copy-button:hover {
  548. background: #404040;
  549. }
  550. .copy-button svg {
  551. width: 14px;
  552. height: 14px;
  553. margin-right: 4px;
  554. }
  555. .tooltip {
  556. position: absolute;
  557. top: -30px;
  558. left: 50%;
  559. transform: translateX(-50%);
  560. background: black;
  561. color: white;
  562. padding: 4px 8px;
  563. border-radius: 4px;
  564. font-size: 12px;
  565. display: none;
  566. }
  567. .tooltip::after {
  568. content: "";
  569. position: absolute;
  570. top: 100%;
  571. left: 50%;
  572. transform: translateX(-50%);
  573. border: 5px solid transparent;
  574. border-top-color: black;
  575. }
  576. .copy-button.copied .tooltip {
  577. display: block;
  578. }
  579. .code-content {
  580. margin: 0;
  581. padding: 0;
  582. }
  583. .code-content pre {
  584. margin: 0;
  585. padding: 10px;
  586. }
  587. </style>
  588. <div class="code-block-container" data-lang="bash">
  589. <div class="code-header">
  590. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  591. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  592. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  593. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  594. </svg>
  595. <span>Copy</span>
  596. <div class="tooltip">Copied!</div>
  597. </button>
  598. </div>
  599. <div class="code-content">
  600. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>/dev/sdb1 /home ext4 defaults <span style="color:#bd93f9">0</span> <span style="color:#bd93f9">2</span></span></span></code></pre></div>
  601. </div>
  602. </div>
  603. <script>
  604. function copyCodeBlock(button) {
  605. const container = button.closest('.code-block-container');
  606. const codeContent = container.querySelector('.code-content pre');
  607. const code = codeContent.textContent;
  608. navigator.clipboard.writeText(code.trim()).then(() => {
  609. button.classList.add('copied');
  610. setTimeout(() => {
  611. button.classList.remove('copied');
  612. }, 2000);
  613. }).catch(err => {
  614. console.error('Failed to copy:', err);
  615. const textarea = document.createElement('textarea');
  616. textarea.value = code.trim();
  617. document.body.appendChild(textarea);
  618. textarea.select();
  619. try {
  620. document.execCommand('copy');
  621. button.classList.add('copied');
  622. setTimeout(() => {
  623. button.classList.remove('copied');
  624. }, 2000);
  625. } catch (e) {
  626. console.error('Fallback failed:', e);
  627. }
  628. document.body.removeChild(textarea);
  629. });
  630. }
  631. </script>
  632. <p>If you prefer using the UUID, first find it:</p>
  633. <style>
  634. .code-block-container {
  635. position: relative;
  636. margin: 1em 0;
  637. border: 1px solid #5E5E5E;
  638. border-radius: 1px;
  639. overflow: hidden;
  640. }
  641. .code-header {
  642. position: absolute;
  643. top: 8px;
  644. right: 8px;
  645. z-index: 999;
  646. }
  647. .copy-button {
  648. display: inline-flex;
  649. align-items: center;
  650. background: #2d2d2d;
  651. color: white;
  652. border: 1px solid #404040;
  653. border-radius: 4px;
  654. padding: 4px 8px;
  655. font-size: 0.8em;
  656. cursor: pointer;
  657. transition: all 0.2s ease;
  658. }
  659. .copy-button:hover {
  660. background: #404040;
  661. }
  662. .copy-button svg {
  663. width: 14px;
  664. height: 14px;
  665. margin-right: 4px;
  666. }
  667. .tooltip {
  668. position: absolute;
  669. top: -30px;
  670. left: 50%;
  671. transform: translateX(-50%);
  672. background: black;
  673. color: white;
  674. padding: 4px 8px;
  675. border-radius: 4px;
  676. font-size: 12px;
  677. display: none;
  678. }
  679. .tooltip::after {
  680. content: "";
  681. position: absolute;
  682. top: 100%;
  683. left: 50%;
  684. transform: translateX(-50%);
  685. border: 5px solid transparent;
  686. border-top-color: black;
  687. }
  688. .copy-button.copied .tooltip {
  689. display: block;
  690. }
  691. .code-content {
  692. margin: 0;
  693. padding: 0;
  694. }
  695. .code-content pre {
  696. margin: 0;
  697. padding: 10px;
  698. }
  699. </style>
  700. <div class="code-block-container" data-lang="bash">
  701. <div class="code-header">
  702. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  703. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  704. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  705. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  706. </svg>
  707. <span>Copy</span>
  708. <div class="tooltip">Copied!</div>
  709. </button>
  710. </div>
  711. <div class="code-content">
  712. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo blkid</span></span></code></pre></div>
  713. </div>
  714. </div>
  715. <script>
  716. function copyCodeBlock(button) {
  717. const container = button.closest('.code-block-container');
  718. const codeContent = container.querySelector('.code-content pre');
  719. const code = codeContent.textContent;
  720. navigator.clipboard.writeText(code.trim()).then(() => {
  721. button.classList.add('copied');
  722. setTimeout(() => {
  723. button.classList.remove('copied');
  724. }, 2000);
  725. }).catch(err => {
  726. console.error('Failed to copy:', err);
  727. const textarea = document.createElement('textarea');
  728. textarea.value = code.trim();
  729. document.body.appendChild(textarea);
  730. textarea.select();
  731. try {
  732. document.execCommand('copy');
  733. button.classList.add('copied');
  734. setTimeout(() => {
  735. button.classList.remove('copied');
  736. }, 2000);
  737. } catch (e) {
  738. console.error('Fallback failed:', e);
  739. }
  740. document.body.removeChild(textarea);
  741. });
  742. }
  743. </script>
  744. <p>Then, add this line instead:</p>
  745. <style>
  746. .code-block-container {
  747. position: relative;
  748. margin: 1em 0;
  749. border: 1px solid #5E5E5E;
  750. border-radius: 1px;
  751. overflow: hidden;
  752. }
  753. .code-header {
  754. position: absolute;
  755. top: 8px;
  756. right: 8px;
  757. z-index: 999;
  758. }
  759. .copy-button {
  760. display: inline-flex;
  761. align-items: center;
  762. background: #2d2d2d;
  763. color: white;
  764. border: 1px solid #404040;
  765. border-radius: 4px;
  766. padding: 4px 8px;
  767. font-size: 0.8em;
  768. cursor: pointer;
  769. transition: all 0.2s ease;
  770. }
  771. .copy-button:hover {
  772. background: #404040;
  773. }
  774. .copy-button svg {
  775. width: 14px;
  776. height: 14px;
  777. margin-right: 4px;
  778. }
  779. .tooltip {
  780. position: absolute;
  781. top: -30px;
  782. left: 50%;
  783. transform: translateX(-50%);
  784. background: black;
  785. color: white;
  786. padding: 4px 8px;
  787. border-radius: 4px;
  788. font-size: 12px;
  789. display: none;
  790. }
  791. .tooltip::after {
  792. content: "";
  793. position: absolute;
  794. top: 100%;
  795. left: 50%;
  796. transform: translateX(-50%);
  797. border: 5px solid transparent;
  798. border-top-color: black;
  799. }
  800. .copy-button.copied .tooltip {
  801. display: block;
  802. }
  803. .code-content {
  804. margin: 0;
  805. padding: 0;
  806. }
  807. .code-content pre {
  808. margin: 0;
  809. padding: 10px;
  810. }
  811. </style>
  812. <div class="code-block-container" data-lang="arduino">
  813. <div class="code-header">
  814. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  815. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  816. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  817. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  818. </svg>
  819. <span>Copy</span>
  820. <div class="tooltip">Copied!</div>
  821. </button>
  822. </div>
  823. <div class="code-content">
  824. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-arduino" data-lang="arduino"><span style="display:flex;"><span>UUID<span style="color:#ff79c6">=</span>your<span style="color:#ff79c6">-</span>uuid <span style="color:#ff79c6">/</span><span style="color:#50fa7b">home</span> ext4 defaults <span style="color:#bd93f9">0</span> <span style="color:#bd93f9">2</span></span></span></code></pre></div>
  825. </div>
  826. </div>
  827. <script>
  828. function copyCodeBlock(button) {
  829. const container = button.closest('.code-block-container');
  830. const codeContent = container.querySelector('.code-content pre');
  831. const code = codeContent.textContent;
  832. navigator.clipboard.writeText(code.trim()).then(() => {
  833. button.classList.add('copied');
  834. setTimeout(() => {
  835. button.classList.remove('copied');
  836. }, 2000);
  837. }).catch(err => {
  838. console.error('Failed to copy:', err);
  839. const textarea = document.createElement('textarea');
  840. textarea.value = code.trim();
  841. document.body.appendChild(textarea);
  842. textarea.select();
  843. try {
  844. document.execCommand('copy');
  845. button.classList.add('copied');
  846. setTimeout(() => {
  847. button.classList.remove('copied');
  848. }, 2000);
  849. } catch (e) {
  850. console.error('Fallback failed:', e);
  851. }
  852. document.body.removeChild(textarea);
  853. });
  854. }
  855. </script>
  856. <hr>
  857. <h2 id="5-unmount-old-home-and-mount-new-one"><strong>5. Unmount Old Home and Mount New One</strong></h2>
  858. <p>Switch to a different session (e.g., TTY):</p>
  859. <style>
  860. .code-block-container {
  861. position: relative;
  862. margin: 1em 0;
  863. border: 1px solid #5E5E5E;
  864. border-radius: 1px;
  865. overflow: hidden;
  866. }
  867. .code-header {
  868. position: absolute;
  869. top: 8px;
  870. right: 8px;
  871. z-index: 999;
  872. }
  873. .copy-button {
  874. display: inline-flex;
  875. align-items: center;
  876. background: #2d2d2d;
  877. color: white;
  878. border: 1px solid #404040;
  879. border-radius: 4px;
  880. padding: 4px 8px;
  881. font-size: 0.8em;
  882. cursor: pointer;
  883. transition: all 0.2s ease;
  884. }
  885. .copy-button:hover {
  886. background: #404040;
  887. }
  888. .copy-button svg {
  889. width: 14px;
  890. height: 14px;
  891. margin-right: 4px;
  892. }
  893. .tooltip {
  894. position: absolute;
  895. top: -30px;
  896. left: 50%;
  897. transform: translateX(-50%);
  898. background: black;
  899. color: white;
  900. padding: 4px 8px;
  901. border-radius: 4px;
  902. font-size: 12px;
  903. display: none;
  904. }
  905. .tooltip::after {
  906. content: "";
  907. position: absolute;
  908. top: 100%;
  909. left: 50%;
  910. transform: translateX(-50%);
  911. border: 5px solid transparent;
  912. border-top-color: black;
  913. }
  914. .copy-button.copied .tooltip {
  915. display: block;
  916. }
  917. .code-content {
  918. margin: 0;
  919. padding: 0;
  920. }
  921. .code-content pre {
  922. margin: 0;
  923. padding: 10px;
  924. }
  925. </style>
  926. <div class="code-block-container" data-lang="bash">
  927. <div class="code-header">
  928. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  929. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  930. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  931. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  932. </svg>
  933. <span>Copy</span>
  934. <div class="tooltip">Copied!</div>
  935. </button>
  936. </div>
  937. <div class="code-content">
  938. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>Ctrl + Alt + F3</span></span></code></pre></div>
  939. </div>
  940. </div>
  941. <script>
  942. function copyCodeBlock(button) {
  943. const container = button.closest('.code-block-container');
  944. const codeContent = container.querySelector('.code-content pre');
  945. const code = codeContent.textContent;
  946. navigator.clipboard.writeText(code.trim()).then(() => {
  947. button.classList.add('copied');
  948. setTimeout(() => {
  949. button.classList.remove('copied');
  950. }, 2000);
  951. }).catch(err => {
  952. console.error('Failed to copy:', err);
  953. const textarea = document.createElement('textarea');
  954. textarea.value = code.trim();
  955. document.body.appendChild(textarea);
  956. textarea.select();
  957. try {
  958. document.execCommand('copy');
  959. button.classList.add('copied');
  960. setTimeout(() => {
  961. button.classList.remove('copied');
  962. }, 2000);
  963. } catch (e) {
  964. console.error('Fallback failed:', e);
  965. }
  966. document.body.removeChild(textarea);
  967. });
  968. }
  969. </script>
  970. <p>Log in and stop processes using <code>/home</code>:</p>
  971. <style>
  972. .code-block-container {
  973. position: relative;
  974. margin: 1em 0;
  975. border: 1px solid #5E5E5E;
  976. border-radius: 1px;
  977. overflow: hidden;
  978. }
  979. .code-header {
  980. position: absolute;
  981. top: 8px;
  982. right: 8px;
  983. z-index: 999;
  984. }
  985. .copy-button {
  986. display: inline-flex;
  987. align-items: center;
  988. background: #2d2d2d;
  989. color: white;
  990. border: 1px solid #404040;
  991. border-radius: 4px;
  992. padding: 4px 8px;
  993. font-size: 0.8em;
  994. cursor: pointer;
  995. transition: all 0.2s ease;
  996. }
  997. .copy-button:hover {
  998. background: #404040;
  999. }
  1000. .copy-button svg {
  1001. width: 14px;
  1002. height: 14px;
  1003. margin-right: 4px;
  1004. }
  1005. .tooltip {
  1006. position: absolute;
  1007. top: -30px;
  1008. left: 50%;
  1009. transform: translateX(-50%);
  1010. background: black;
  1011. color: white;
  1012. padding: 4px 8px;
  1013. border-radius: 4px;
  1014. font-size: 12px;
  1015. display: none;
  1016. }
  1017. .tooltip::after {
  1018. content: "";
  1019. position: absolute;
  1020. top: 100%;
  1021. left: 50%;
  1022. transform: translateX(-50%);
  1023. border: 5px solid transparent;
  1024. border-top-color: black;
  1025. }
  1026. .copy-button.copied .tooltip {
  1027. display: block;
  1028. }
  1029. .code-content {
  1030. margin: 0;
  1031. padding: 0;
  1032. }
  1033. .code-content pre {
  1034. margin: 0;
  1035. padding: 10px;
  1036. }
  1037. </style>
  1038. <div class="code-block-container" data-lang="bash">
  1039. <div class="code-header">
  1040. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  1041. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1042. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  1043. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  1044. </svg>
  1045. <span>Copy</span>
  1046. <div class="tooltip">Copied!</div>
  1047. </button>
  1048. </div>
  1049. <div class="code-content">
  1050. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo systemctl stop gdm <span style="color:#6272a4"># For GNOME (or use sddm/lightdm if applicable)</span></span></span></code></pre></div>
  1051. </div>
  1052. </div>
  1053. <script>
  1054. function copyCodeBlock(button) {
  1055. const container = button.closest('.code-block-container');
  1056. const codeContent = container.querySelector('.code-content pre');
  1057. const code = codeContent.textContent;
  1058. navigator.clipboard.writeText(code.trim()).then(() => {
  1059. button.classList.add('copied');
  1060. setTimeout(() => {
  1061. button.classList.remove('copied');
  1062. }, 2000);
  1063. }).catch(err => {
  1064. console.error('Failed to copy:', err);
  1065. const textarea = document.createElement('textarea');
  1066. textarea.value = code.trim();
  1067. document.body.appendChild(textarea);
  1068. textarea.select();
  1069. try {
  1070. document.execCommand('copy');
  1071. button.classList.add('copied');
  1072. setTimeout(() => {
  1073. button.classList.remove('copied');
  1074. }, 2000);
  1075. } catch (e) {
  1076. console.error('Fallback failed:', e);
  1077. }
  1078. document.body.removeChild(textarea);
  1079. });
  1080. }
  1081. </script>
  1082. <p>Unmount and remount:</p>
  1083. <style>
  1084. .code-block-container {
  1085. position: relative;
  1086. margin: 1em 0;
  1087. border: 1px solid #5E5E5E;
  1088. border-radius: 1px;
  1089. overflow: hidden;
  1090. }
  1091. .code-header {
  1092. position: absolute;
  1093. top: 8px;
  1094. right: 8px;
  1095. z-index: 999;
  1096. }
  1097. .copy-button {
  1098. display: inline-flex;
  1099. align-items: center;
  1100. background: #2d2d2d;
  1101. color: white;
  1102. border: 1px solid #404040;
  1103. border-radius: 4px;
  1104. padding: 4px 8px;
  1105. font-size: 0.8em;
  1106. cursor: pointer;
  1107. transition: all 0.2s ease;
  1108. }
  1109. .copy-button:hover {
  1110. background: #404040;
  1111. }
  1112. .copy-button svg {
  1113. width: 14px;
  1114. height: 14px;
  1115. margin-right: 4px;
  1116. }
  1117. .tooltip {
  1118. position: absolute;
  1119. top: -30px;
  1120. left: 50%;
  1121. transform: translateX(-50%);
  1122. background: black;
  1123. color: white;
  1124. padding: 4px 8px;
  1125. border-radius: 4px;
  1126. font-size: 12px;
  1127. display: none;
  1128. }
  1129. .tooltip::after {
  1130. content: "";
  1131. position: absolute;
  1132. top: 100%;
  1133. left: 50%;
  1134. transform: translateX(-50%);
  1135. border: 5px solid transparent;
  1136. border-top-color: black;
  1137. }
  1138. .copy-button.copied .tooltip {
  1139. display: block;
  1140. }
  1141. .code-content {
  1142. margin: 0;
  1143. padding: 0;
  1144. }
  1145. .code-content pre {
  1146. margin: 0;
  1147. padding: 10px;
  1148. }
  1149. </style>
  1150. <div class="code-block-container" data-lang="bash">
  1151. <div class="code-header">
  1152. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  1153. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1154. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  1155. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  1156. </svg>
  1157. <span>Copy</span>
  1158. <div class="tooltip">Copied!</div>
  1159. </button>
  1160. </div>
  1161. <div class="code-content">
  1162. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo umount /home
  1163. </span></span><span style="display:flex;"><span>sudo mount /home</span></span></code></pre></div>
  1164. </div>
  1165. </div>
  1166. <script>
  1167. function copyCodeBlock(button) {
  1168. const container = button.closest('.code-block-container');
  1169. const codeContent = container.querySelector('.code-content pre');
  1170. const code = codeContent.textContent;
  1171. navigator.clipboard.writeText(code.trim()).then(() => {
  1172. button.classList.add('copied');
  1173. setTimeout(() => {
  1174. button.classList.remove('copied');
  1175. }, 2000);
  1176. }).catch(err => {
  1177. console.error('Failed to copy:', err);
  1178. const textarea = document.createElement('textarea');
  1179. textarea.value = code.trim();
  1180. document.body.appendChild(textarea);
  1181. textarea.select();
  1182. try {
  1183. document.execCommand('copy');
  1184. button.classList.add('copied');
  1185. setTimeout(() => {
  1186. button.classList.remove('copied');
  1187. }, 2000);
  1188. } catch (e) {
  1189. console.error('Fallback failed:', e);
  1190. }
  1191. document.body.removeChild(textarea);
  1192. });
  1193. }
  1194. </script>
  1195. <hr>
  1196. <h2 id="6-verify-and-reboot"><strong>6. Verify and Reboot</strong></h2>
  1197. <p>Check that everything is in place:</p>
  1198. <style>
  1199. .code-block-container {
  1200. position: relative;
  1201. margin: 1em 0;
  1202. border: 1px solid #5E5E5E;
  1203. border-radius: 1px;
  1204. overflow: hidden;
  1205. }
  1206. .code-header {
  1207. position: absolute;
  1208. top: 8px;
  1209. right: 8px;
  1210. z-index: 999;
  1211. }
  1212. .copy-button {
  1213. display: inline-flex;
  1214. align-items: center;
  1215. background: #2d2d2d;
  1216. color: white;
  1217. border: 1px solid #404040;
  1218. border-radius: 4px;
  1219. padding: 4px 8px;
  1220. font-size: 0.8em;
  1221. cursor: pointer;
  1222. transition: all 0.2s ease;
  1223. }
  1224. .copy-button:hover {
  1225. background: #404040;
  1226. }
  1227. .copy-button svg {
  1228. width: 14px;
  1229. height: 14px;
  1230. margin-right: 4px;
  1231. }
  1232. .tooltip {
  1233. position: absolute;
  1234. top: -30px;
  1235. left: 50%;
  1236. transform: translateX(-50%);
  1237. background: black;
  1238. color: white;
  1239. padding: 4px 8px;
  1240. border-radius: 4px;
  1241. font-size: 12px;
  1242. display: none;
  1243. }
  1244. .tooltip::after {
  1245. content: "";
  1246. position: absolute;
  1247. top: 100%;
  1248. left: 50%;
  1249. transform: translateX(-50%);
  1250. border: 5px solid transparent;
  1251. border-top-color: black;
  1252. }
  1253. .copy-button.copied .tooltip {
  1254. display: block;
  1255. }
  1256. .code-content {
  1257. margin: 0;
  1258. padding: 0;
  1259. }
  1260. .code-content pre {
  1261. margin: 0;
  1262. padding: 10px;
  1263. }
  1264. </style>
  1265. <div class="code-block-container" data-lang="bash">
  1266. <div class="code-header">
  1267. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  1268. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1269. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  1270. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  1271. </svg>
  1272. <span>Copy</span>
  1273. <div class="tooltip">Copied!</div>
  1274. </button>
  1275. </div>
  1276. <div class="code-content">
  1277. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ls /home</span></span></code></pre></div>
  1278. </div>
  1279. </div>
  1280. <script>
  1281. function copyCodeBlock(button) {
  1282. const container = button.closest('.code-block-container');
  1283. const codeContent = container.querySelector('.code-content pre');
  1284. const code = codeContent.textContent;
  1285. navigator.clipboard.writeText(code.trim()).then(() => {
  1286. button.classList.add('copied');
  1287. setTimeout(() => {
  1288. button.classList.remove('copied');
  1289. }, 2000);
  1290. }).catch(err => {
  1291. console.error('Failed to copy:', err);
  1292. const textarea = document.createElement('textarea');
  1293. textarea.value = code.trim();
  1294. document.body.appendChild(textarea);
  1295. textarea.select();
  1296. try {
  1297. document.execCommand('copy');
  1298. button.classList.add('copied');
  1299. setTimeout(() => {
  1300. button.classList.remove('copied');
  1301. }, 2000);
  1302. } catch (e) {
  1303. console.error('Fallback failed:', e);
  1304. }
  1305. document.body.removeChild(textarea);
  1306. });
  1307. }
  1308. </script>
  1309. <p>If everything looks good, reboot:</p>
  1310. <style>
  1311. .code-block-container {
  1312. position: relative;
  1313. margin: 1em 0;
  1314. border: 1px solid #5E5E5E;
  1315. border-radius: 1px;
  1316. overflow: hidden;
  1317. }
  1318. .code-header {
  1319. position: absolute;
  1320. top: 8px;
  1321. right: 8px;
  1322. z-index: 999;
  1323. }
  1324. .copy-button {
  1325. display: inline-flex;
  1326. align-items: center;
  1327. background: #2d2d2d;
  1328. color: white;
  1329. border: 1px solid #404040;
  1330. border-radius: 4px;
  1331. padding: 4px 8px;
  1332. font-size: 0.8em;
  1333. cursor: pointer;
  1334. transition: all 0.2s ease;
  1335. }
  1336. .copy-button:hover {
  1337. background: #404040;
  1338. }
  1339. .copy-button svg {
  1340. width: 14px;
  1341. height: 14px;
  1342. margin-right: 4px;
  1343. }
  1344. .tooltip {
  1345. position: absolute;
  1346. top: -30px;
  1347. left: 50%;
  1348. transform: translateX(-50%);
  1349. background: black;
  1350. color: white;
  1351. padding: 4px 8px;
  1352. border-radius: 4px;
  1353. font-size: 12px;
  1354. display: none;
  1355. }
  1356. .tooltip::after {
  1357. content: "";
  1358. position: absolute;
  1359. top: 100%;
  1360. left: 50%;
  1361. transform: translateX(-50%);
  1362. border: 5px solid transparent;
  1363. border-top-color: black;
  1364. }
  1365. .copy-button.copied .tooltip {
  1366. display: block;
  1367. }
  1368. .code-content {
  1369. margin: 0;
  1370. padding: 0;
  1371. }
  1372. .code-content pre {
  1373. margin: 0;
  1374. padding: 10px;
  1375. }
  1376. </style>
  1377. <div class="code-block-container" data-lang="bash">
  1378. <div class="code-header">
  1379. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  1380. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1381. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  1382. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  1383. </svg>
  1384. <span>Copy</span>
  1385. <div class="tooltip">Copied!</div>
  1386. </button>
  1387. </div>
  1388. <div class="code-content">
  1389. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo reboot</span></span></code></pre></div>
  1390. </div>
  1391. </div>
  1392. <script>
  1393. function copyCodeBlock(button) {
  1394. const container = button.closest('.code-block-container');
  1395. const codeContent = container.querySelector('.code-content pre');
  1396. const code = codeContent.textContent;
  1397. navigator.clipboard.writeText(code.trim()).then(() => {
  1398. button.classList.add('copied');
  1399. setTimeout(() => {
  1400. button.classList.remove('copied');
  1401. }, 2000);
  1402. }).catch(err => {
  1403. console.error('Failed to copy:', err);
  1404. const textarea = document.createElement('textarea');
  1405. textarea.value = code.trim();
  1406. document.body.appendChild(textarea);
  1407. textarea.select();
  1408. try {
  1409. document.execCommand('copy');
  1410. button.classList.add('copied');
  1411. setTimeout(() => {
  1412. button.classList.remove('copied');
  1413. }, 2000);
  1414. } catch (e) {
  1415. console.error('Fallback failed:', e);
  1416. }
  1417. document.body.removeChild(textarea);
  1418. });
  1419. }
  1420. </script>
  1421. <hr>
  1422. <h1 id="things-to-keep-in-mind">Things to Keep in Mind</h1>
  1423. <ul>
  1424. <li>
  1425. <p>If you&rsquo;re logged in as a regular user, switch to a root shell (sudo -i) or use a temporary user with administrative privileges.</p>
  1426. </li>
  1427. <li>
  1428. <p>If you face permission issues, you might need to reapply ownership:</p>
  1429. </li>
  1430. </ul>
  1431. <style>
  1432. .code-block-container {
  1433. position: relative;
  1434. margin: 1em 0;
  1435. border: 1px solid #5E5E5E;
  1436. border-radius: 1px;
  1437. overflow: hidden;
  1438. }
  1439. .code-header {
  1440. position: absolute;
  1441. top: 8px;
  1442. right: 8px;
  1443. z-index: 999;
  1444. }
  1445. .copy-button {
  1446. display: inline-flex;
  1447. align-items: center;
  1448. background: #2d2d2d;
  1449. color: white;
  1450. border: 1px solid #404040;
  1451. border-radius: 4px;
  1452. padding: 4px 8px;
  1453. font-size: 0.8em;
  1454. cursor: pointer;
  1455. transition: all 0.2s ease;
  1456. }
  1457. .copy-button:hover {
  1458. background: #404040;
  1459. }
  1460. .copy-button svg {
  1461. width: 14px;
  1462. height: 14px;
  1463. margin-right: 4px;
  1464. }
  1465. .tooltip {
  1466. position: absolute;
  1467. top: -30px;
  1468. left: 50%;
  1469. transform: translateX(-50%);
  1470. background: black;
  1471. color: white;
  1472. padding: 4px 8px;
  1473. border-radius: 4px;
  1474. font-size: 12px;
  1475. display: none;
  1476. }
  1477. .tooltip::after {
  1478. content: "";
  1479. position: absolute;
  1480. top: 100%;
  1481. left: 50%;
  1482. transform: translateX(-50%);
  1483. border: 5px solid transparent;
  1484. border-top-color: black;
  1485. }
  1486. .copy-button.copied .tooltip {
  1487. display: block;
  1488. }
  1489. .code-content {
  1490. margin: 0;
  1491. padding: 0;
  1492. }
  1493. .code-content pre {
  1494. margin: 0;
  1495. padding: 10px;
  1496. }
  1497. </style>
  1498. <div class="code-block-container" data-lang="bash">
  1499. <div class="code-header">
  1500. <button class="copy-button" onclick="copyCodeBlock(this)" aria-label="Copy code">
  1501. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1502. <path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z"/>
  1503. <path d="M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2"/>
  1504. </svg>
  1505. <span>Copy</span>
  1506. <div class="tooltip">Copied!</div>
  1507. </button>
  1508. </div>
  1509. <div class="code-content">
  1510. <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo chown -R username:username /home/username</span></span></code></pre></div>
  1511. </div>
  1512. </div>
  1513. <script>
  1514. function copyCodeBlock(button) {
  1515. const container = button.closest('.code-block-container');
  1516. const codeContent = container.querySelector('.code-content pre');
  1517. const code = codeContent.textContent;
  1518. navigator.clipboard.writeText(code.trim()).then(() => {
  1519. button.classList.add('copied');
  1520. setTimeout(() => {
  1521. button.classList.remove('copied');
  1522. }, 2000);
  1523. }).catch(err => {
  1524. console.error('Failed to copy:', err);
  1525. const textarea = document.createElement('textarea');
  1526. textarea.value = code.trim();
  1527. document.body.appendChild(textarea);
  1528. textarea.select();
  1529. try {
  1530. document.execCommand('copy');
  1531. button.classList.add('copied');
  1532. setTimeout(() => {
  1533. button.classList.remove('copied');
  1534. }, 2000);
  1535. } catch (e) {
  1536. console.error('Fallback failed:', e);
  1537. }
  1538. document.body.removeChild(textarea);
  1539. });
  1540. }
  1541. </script>
  1542. </div>
  1543. </div>
  1544. </main>
  1545. </div>
  1546. <footer class="footer">
  1547. <span>CC 2025, Built with <a href="https://gohugo.io" class="footerLink">Hugo</a> | Analytics by <a href="https://umami.is" class="footerLink">Self-hosted Umami</a></span>
  1548. </footer>
  1549. </div>
  1550. </body>
  1551. </html>