{"id":7205,"date":"2026-09-30T16:00:38","date_gmt":"2026-09-30T21:00:38","guid":{"rendered":"https:\/\/ykim.synology.me\/wordpress\/ubuntu-cli-7205\/"},"modified":"2026-09-30T16:00:49","modified_gmt":"2026-09-30T21:00:49","slug":"ubuntu-cli","status":"publish","type":"post","link":"https:\/\/ykim.synology.me\/wordpress\/ubuntu-cli-7205\/","title":{"rendered":"Ubuntu CLI"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/yBarn1\/Images\/blob\/main\/produce\/green-limes-produce-bin.jpg?raw=true\" alt=\"\" style=\"width:auto;height:500px\"\/><\/figure>\n\n\n<p><div class=\"github-readme-container markdown-body\"><div id=\"file\" class=\"md\" data-path=\"Ubuntu\/ubuntu-cli-ko.md\"><article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 class=\"heading-element\" dir=\"auto\">Ubuntu CLI (Korean)<\/h1><a id=\"user-content-ubuntu-cli-korean\" class=\"anchor\" aria-label=\"Permalink: Ubuntu CLI (Korean)\" href=\"#ubuntu-cli-korean\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Rev. 4 | Created: 2026-09-30 | Updated: 2026-10-02 23:53 UTC<\/p>\n<blockquote>\n<p dir=\"auto\">\uc774 \ubb38\uc11c\uc758 \uba85\ub839\uc740 <strong>Ubuntu<\/strong> \uae30\uc900\uc774\ub2e4.<\/p>\n<\/blockquote>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">1. Users<\/h2><a id=\"user-content-1-users\" class=\"anchor\" aria-label=\"Permalink: 1. Users\" href=\"#1-users\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Ubuntu \uc5d0\uc11c\ub294 \ub300\ud654\ud615 \ub3c4\uad6c\uc778 <code>adduser<\/code>\/<code>deluser<\/code> \ub97c \uad8c\uc7a5\ud55c\ub2e4. (<code>useradd<\/code>\/<code>userdel<\/code> \ub3c4 \uc788\uc9c0\ub9cc option \uc744 \ud558\ub098\ud558\ub098 \uc9c1\uc811 \uc9c0\uc815\ud574\uc57c \ud55c\ub2e4.)<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">1.1 Create a user<\/h3><a id=\"user-content-11-create-a-user\" class=\"anchor\" aria-label=\"Permalink: 1.1 Create a user\" href=\"#11-create-a-user\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo adduser username    # Create account + home directory; prompts for password and details\"><pre>sudo adduser username    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Create account + home directory; prompts for password and details<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>home directory (<code>\/home\/username<\/code>), \uae30\ubcf8 group, login shell \uc744 \uc790\ub3d9\uc73c\ub85c \ub9cc\ub4e0\ub2e4.<\/li>\n<li>\ube44\ubc00\ubc88\ud638, \uc774\ub984 \ub4f1 \uc138\ubd80 \uc815\ubcf4\ub97c \ub300\ud654\ud615\uc73c\ub85c \ubb3b\ub294\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">1.2 List users<\/h3><a id=\"user-content-12-list-users\" class=\"anchor\" aria-label=\"Permalink: 1.2 List users\" href=\"#12-list-users\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"getent passwd                                     # List all accounts (system + human)\ncut -d: -f1 \/etc\/passwd                            # List just the usernames\nawk -F: '$3&gt;=1000 &amp;&amp; $3&lt;65534 {print $1}' \/etc\/passwd   # Human users only (UID 1000-65533)\"><pre>getent passwd                                     <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> List all accounts (system + human)<\/span>\ncut -d: -f1 \/etc\/passwd                            <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> List just the usernames<\/span>\nawk -F: <span class=\"pl-s\"><span class=\"pl-pds\">'<\/span>$3&gt;=1000 &amp;&amp; $3&lt;65534 {print $1}<span class=\"pl-pds\">'<\/span><\/span> \/etc\/passwd   <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Human users only (UID 1000-65533)<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>Ubuntu \uc5d0\uc11c \uc77c\ubc18 (\uc0ac\ub78c) \uacc4\uc815\uc740 UID 1000 \ubd80\ud130 \uc2dc\uc791\ud558\uace0, \uadf8\ubcf4\ub2e4 \ub0ae\uc740 UID \ub294 system \uacc4\uc815\uc774\ub2e4.<\/li>\n<li><code>who<\/code> \/ <code>w<\/code> \u2014 \ud604\uc7ac \ub85c\uadf8\uc778\ud55c \uc0ac\uc6a9\uc790\ub9cc \ud45c\uc2dc (\uc804\uccb4 \uacc4\uc815 \uc544\ub2d8).<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">1.3 Verify a user<\/h3><a id=\"user-content-13-verify-a-user\" class=\"anchor\" aria-label=\"Permalink: 1.3 Verify a user\" href=\"#13-verify-a-user\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"id username              # Show UID, GID, and group membership\ngetent passwd username   # Show the \/etc\/passwd entry\nls -ld \/home\/username    # Show home directory owner and permissions\"><pre>id username              <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Show UID, GID, and group membership<\/span>\ngetent passwd username   <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Show the \/etc\/passwd entry<\/span>\nls -ld \/home\/username    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Show home directory owner and permissions<\/span><\/pre><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">1.4 Delete a user<\/h3><a id=\"user-content-14-delete-a-user\" class=\"anchor\" aria-label=\"Permalink: 1.4 Delete a user\" href=\"#14-delete-a-user\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo deluser username                  # Delete account only (home directory remains)\nsudo deluser --remove-home username    # Delete account together with the home directory\"><pre>sudo deluser username                  <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Delete account only (home directory remains)<\/span>\nsudo deluser --remove-home username    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Delete account together with the home directory<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>--remove-home<\/code> \u2014 home directory (<code>\/home\/username<\/code>) \ub3c4 \ud568\uaed8 \uc0ad\uc81c.<\/li>\n<li>\uadf8 \uc0ac\uc6a9\uc790\uc758 process \uac00 \uc544\uc9c1 \uc2e4\ud589 \uc911\uc774\uba74 \uc0ad\uc81c\uac00 \uac70\ubd80\ub420 \uc218 \uc788\ub2e4. \uba3c\uc800 \uadf8 process \ub97c \uc885\ub8cc\ud55c\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">1.5 Grant sudo privileges<\/h3><a id=\"user-content-15-grant-sudo-privileges\" class=\"anchor\" aria-label=\"Permalink: 1.5 Grant sudo privileges\" href=\"#15-grant-sudo-privileges\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo usermod -aG sudo username   # Add the user to the sudo group\"><pre>sudo usermod -aG sudo username   <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Add the user to the sudo group<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>Ubuntu \uc5d0\uc11c \uad00\ub9ac\uc790 (sudo) group \uc758 \uc774\ub984\uc740 <code>sudo<\/code> \uc774\ub2e4.<\/li>\n<li><code>-aG<\/code> \u2014 \uae30\uc874 group \uc744 \uc720\uc9c0\ud558\uba74\uc11c (<code>-a<\/code>) \uc9c0\uc815\ud55c group \uc5d0 \ucd94\uac00 (<code>-G<\/code>). <code>-a<\/code> \uc5c6\uc774 <code>-G<\/code> \ub9cc \uc4f0\uba74 \uae30\uc874 supplementary group \uc774 \ubaa8\ub450 \ub300\uccb4\ub418\ubbc0\ub85c \uc8fc\uc758\ud55c\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">2. Files &amp; Permissions<\/h2><a id=\"user-content-2-files--permissions\" class=\"anchor\" aria-label=\"Permalink: 2. Files &amp; Permissions\" href=\"#2-files--permissions\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">2.1 Change ownership<\/h3><a id=\"user-content-21-change-ownership\" class=\"anchor\" aria-label=\"Permalink: 2.1 Change ownership\" href=\"#21-change-ownership\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ud604\uc7ac directory \uc548\uc758 \ubaa8\ub4e0 \uac83\uc758 \uc18c\uc720\uc790\ub97c \ubc14\uafbc\ub2e4 (\uc608: <code>root<\/code> \uc5d0\uc11c \ud2b9\uc815 \uc0ac\uc6a9\uc790\ub85c):<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo chown -R username:username .    # Recursively set owner and group to username\"><pre>sudo chown -R username:username <span class=\"pl-c1\">.<\/span>    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Recursively set owner and group to username<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>-R<\/code> \u2014 \uc7ac\uadc0; \uc544\ub798\uc758 \ubaa8\ub4e0 file \uacfc \ud558\uc704 directory \uc5d0 \uc801\uc6a9.<\/li>\n<li><code>username:username<\/code> \u2014 <code>owner:group<\/code> \ud615\uc2dd; group \ub3c4 \ud568\uaed8 \ubcc0\uacbd.<\/li>\n<li><code>.<\/code> \u2014 \ud604\uc7ac directory. \uc6d0\ud558\uba74 \uba85\uc2dc\uc801 \uacbd\ub85c (<code>\/path\/to\/dir<\/code>) \uc0ac\uc6a9.<\/li>\n<\/ul>\n<p dir=\"auto\">\ubcc0\ud615:<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo chown -R username .        # Change owner only (leave group unchanged)\nsudo chown -R username: .       # Change owner and set group to username's primary group\nsudo chown -R :groupname .      # Change group only\"><pre>sudo chown -R username <span class=\"pl-c1\">.<\/span>        <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Change owner only (leave group unchanged)<\/span>\nsudo chown -R username: <span class=\"pl-c1\">.<\/span>       <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Change owner and set group to username's primary group<\/span>\nsudo chown -R :groupname <span class=\"pl-c1\">.<\/span>      <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Change group only<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>\ud604\uc7ac directory \uc790\uc2e0\uacfc \uc228\uc740 dotfile \uae4c\uc9c0 \ud3ec\ud568\ud558\ub824\uba74 <code>.\/*<\/code> \uac00 \uc544\ub2cc <code>.<\/code> \uc744 \ub300\uc0c1\uc73c\ub85c \ud55c\ub2e4; <code>.\/*<\/code> \ub294 <code>.<\/code> \uc73c\ub85c \uc2dc\uc791\ud558\ub294 \uc774\ub984\uc744 \uac74\ub108\ub6f4\ub2e4.<\/li>\n<li>\uae30\ubcf8\uc801\uc73c\ub85c symlink \uc790\uccb4\ub9cc \ubc14\ub00c\uace0 \uadf8 \ub300\uc0c1\uc740 \ubc14\ub00c\uc9c0 \uc54a\ub294\ub2e4.<\/li>\n<li>\ubcc0\uacbd \uc804\ud6c4\uc5d0 <code>ls -la<\/code> \ub85c \ud655\uc778\ud55c\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">3. Network<\/h2><a id=\"user-content-3-network\" class=\"anchor\" aria-label=\"Permalink: 3. Network\" href=\"#3-network\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.1 Show IP addresses<\/h3><a id=\"user-content-31-show-ip-addresses\" class=\"anchor\" aria-label=\"Permalink: 3.1 Show IP addresses\" href=\"#31-show-ip-addresses\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"hostname -I                    # All IP addresses of this host, space-separated\nip addr                        # Full interface details (addresses, state, MAC)\nip -4 addr show scope global   # IPv4 addresses on external interfaces only\"><pre>hostname -I                    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> All IP addresses of this host, space-separated<\/span>\nip addr                        <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Full interface details (addresses, state, MAC)<\/span>\nip -4 addr show scope global   <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> IPv4 addresses on external interfaces only<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>hostname -I<\/code> \u2014 machine \uc758 IP \ub97c \uac00\uc7a5 \ube68\ub9ac \ud655\uc778\ud558\ub294 \ubc29\ubc95; loopback (<code>127.0.0.1<\/code>) \uc81c\uc678.<\/li>\n<li>\uac19\uc740 network \uc758 \ub2e4\ub978 host \uc5d0\uc11c \uc811\uc18d\ud560 \ub54c\ub294 LAN \uc8fc\uc18c (\uc608: <code>192.168.x.x<\/code>) \ub97c \uc4f4\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.2 Show MAC address<\/h3><a id=\"user-content-32-show-mac-address\" class=\"anchor\" aria-label=\"Permalink: 3.2 Show MAC address\" href=\"#32-show-mac-address\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"ip link                                    # MAC address (link\/ether) of every interface\ncat \/sys\/class\/net\/eth0\/address            # MAC of a specific interface (replace eth0)\nip link show eth0                          # MAC of one interface with its state\"><pre>ip link                                    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> MAC address (link\/ether) of every interface<\/span>\ncat \/sys\/class\/net\/eth0\/address            <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> MAC of a specific interface (replace eth0)<\/span>\nip link show eth0                          <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> MAC of one interface with its state<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>ip link<\/code> \ucd9c\ub825\uc5d0\uc11c MAC \uc740 <code>link\/ether<\/code> label \ub4a4\uc5d0 \ub098\uc628\ub2e4.<\/li>\n<li>\uba3c\uc800 <code>ls \/sys\/class\/net<\/code> \uc73c\ub85c interface \uc774\ub984\uc744 \ud655\uc778\ud55c\ub2e4 (\uc608: <code>eth0<\/code>, <code>ens33<\/code>, <code>wlan0<\/code>, <code>lo<\/code>).<\/li>\n<li><code>lo<\/code> (loopback) \ub294 MAC \uc774 \ubaa8\ub450 0 (<code>00:00:00:00:00:00<\/code>) \uc73c\ub85c \uace0\uc815\ub418\uc5b4 \uc788\uc73c\ub2c8 \ubb34\uc2dc\ud55c\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.3 Check connectivity and open ports<\/h3><a id=\"user-content-33-check-connectivity-and-open-ports\" class=\"anchor\" aria-label=\"Permalink: 3.3 Check connectivity and open ports\" href=\"#33-check-connectivity-and-open-ports\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"ping &lt;host&gt;                    # Test reachability to a host or IP\nss -tlnp                       # List listening TCP ports and owning processes\nss -tlnp | grep 8001           # Check whether a specific port is listening\"><pre>ping <span class=\"pl-k\">&lt;<\/span>host<span class=\"pl-k\">&gt;<\/span>                    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Test reachability to a host or IP<\/span>\nss -tlnp                       <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> List listening TCP ports and owning processes<\/span>\nss -tlnp <span class=\"pl-k\">|<\/span> grep 8001           <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Check whether a specific port is listening<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>ss -tlnp<\/code> \ub294 <code>0.0.0.0:PORT<\/code> (\ubaa8\ub4e0 interface, \uc678\ubd80\uc5d0\uc11c \uc811\uadfc \uac00\ub2a5) \uc640 <code>127.0.0.1:PORT<\/code> (local \uc804\uc6a9) \ub97c \uad6c\ubd84\ud574 \ubcf4\uc5ec\uc900\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">4. Sudo<\/h2><a id=\"user-content-4-sudo\" class=\"anchor\" aria-label=\"Permalink: 4. Sudo\" href=\"#4-sudo\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uba85\ub839\ub9c8\ub2e4 \uc55e\uc5d0 <code>sudo<\/code> \ub97c \uc785\ub825\ud558\uc9c0 \uc54a\ub294 \ubc29\ubc95.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.1 Open a root shell<\/h3><a id=\"user-content-41-open-a-root-shell\" class=\"anchor\" aria-label=\"Permalink: 4.1 Open a root shell\" href=\"#41-open-a-root-shell\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo -i    # Root login shell (root's environment)\nsudo -s    # Root shell (keep current environment)\"><pre>sudo -i    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Root login shell (root's environment)<\/span>\nsudo -s    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Root shell (keep current environment)<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>prompt \uac00 <code>#<\/code> \ub85c \ubc14\ub00c\uace0, \uc774\ud6c4 \uba85\ub839\uc740 <code>sudo<\/code> \uc5c6\uc774 \uc2e4\ud589\ub41c\ub2e4.<\/li>\n<li>\uc790\uc2e0\uc758 \ube44\ubc00\ubc88\ud638\ub85c \ud55c \ubc88\ub9cc \uc778\uc99d\ud55c\ub2e4.<\/li>\n<li>\uc791\uc5c5\uc774 \ub05d\ub098\uba74 \ubc18\ub4dc\uc2dc <code>exit<\/code> \ud55c\ub2e4 \u2014 root shell \uc5d0 \uba38\ubb3c\uc9c0 \uc54a\ub294\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.2 Extend the sudo password timeout<\/h3><a id=\"user-content-42-extend-the-sudo-password-timeout\" class=\"anchor\" aria-label=\"Permalink: 4.2 Extend the sudo password timeout\" href=\"#42-extend-the-sudo-password-timeout\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">sudo \ub294 \uae30\ubcf8\uc801\uc73c\ub85c \uc778\uc99d\uc744 5\ubd84\uac04 \uae30\uc5b5\ud55c\ub2e4. \ubc14\uafb8\ub824\uba74 sudoers file \uc744 \uc548\uc804\ud558\uac8c \ud3b8\uc9d1\ud55c\ub2e4:<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo visudo\"><pre>sudo visudo<\/pre><\/div>\n<p dir=\"auto\">\uc544\ub798 \uc904\uc744 \ucd94\uac00\ud558\uac70\ub098 \uace0\uce5c\ub2e4:<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"Defaults        timestamp_timeout=30\"><pre class=\"notranslate\"><code>Defaults        timestamp_timeout=30\n<\/code><\/pre><\/div>\n<ul dir=\"auto\">\n<li>\uac12\uc758 \ub2e8\uc704\ub294 \ubd84\uc774\ub2e4 (<code>30<\/code> = 30\ubd84 \ub3d9\uc548 \ub2e4\uc2dc \ubb3b\uc9c0 \uc54a\uc74c).<\/li>\n<li><code>-1<\/code> \uc740 logout \uc804\uae4c\uc9c0 \ub9cc\ub8cc\ub418\uc9c0 \uc54a\uc74c\uc744 \ub73b\ud55c\ub2e4 \u2014 \ubcf4\uc548\uc0c1 \uad8c\uc7a5\ud558\uc9c0 \uc54a\ub294\ub2e4.<\/li>\n<li>\ud56d\uc0c1 <code>visudo<\/code> \ub85c \ud3b8\uc9d1\ud55c\ub2e4; \ubb38\ubc95\uc744 \uac80\uc0ac\ud574 sudoers \uac00 \uae68\uc9c0\ub294 \uac83\uc744 \ub9c9\ub294\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.3 Group several commands under one sudo<\/h3><a id=\"user-content-43-group-several-commands-under-one-sudo\" class=\"anchor\" aria-label=\"Permalink: 4.3 Group several commands under one sudo\" href=\"#43-group-several-commands-under-one-sudo\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo bash -c 'apt update &amp;&amp; apt install -y curl &amp;&amp; systemctl restart docker'\"><pre>sudo bash -c <span class=\"pl-s\"><span class=\"pl-pds\">'<\/span>apt update &amp;&amp; apt install -y curl &amp;&amp; systemctl restart docker<span class=\"pl-pds\">'<\/span><\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>\ud558\ub098\uc758 <code>sudo<\/code> \uc548\uc5d0\uc11c <code>&amp;&amp;<\/code> \ub85c \uc774\uc5b4 \ubd99\uc774\uba74 \ube44\ubc00\ubc88\ud638\ub97c \ud55c \ubc88\ub9cc \ubb3b\ub294\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.4 Re-run the previous command with sudo<\/h3><a id=\"user-content-44-re-run-the-previous-command-with-sudo\" class=\"anchor\" aria-label=\"Permalink: 4.4 Re-run the previous command with sudo\" href=\"#44-re-run-the-previous-command-with-sudo\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo !!    # Repeat the last command with sudo prepended\"><pre>sudo <span class=\"pl-k\">!!<\/span>    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Repeat the last command with sudo prepended<\/span><\/pre><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">5. SSH<\/h2><a id=\"user-content-5-ssh\" class=\"anchor\" aria-label=\"Permalink: 5. SSH\" href=\"#5-ssh\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.1 Connect to another Linux host<\/h3><a id=\"user-content-51-connect-to-another-linux-host\" class=\"anchor\" aria-label=\"Permalink: 5.1 Connect to another Linux host\" href=\"#51-connect-to-another-linux-host\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"ssh &lt;USER&gt;@&lt;HOST_IP&gt;          # Log in to a remote host as &lt;USER&gt;\nssh ubuntu@192.168.0.10       # Example\"><pre>ssh <span class=\"pl-k\">&lt;<\/span>USER<span class=\"pl-k\">&gt;<\/span>@<span class=\"pl-k\">&lt;<\/span>HOST_IP<span class=\"pl-k\">&gt;<\/span>          <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Log in to a remote host as &lt;USER&gt;<\/span>\nssh ubuntu@192.168.0.10       <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Example<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>server \ucabd \uc124\uc815 (<code>openssh-server<\/code>): <a href=\"#appendix-c-ssh-server-setup\">Appendix C<\/a>.<\/li>\n<\/ul>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/ykim2718\/MLOps\/blob\/main\/Ubuntu\/ubuntu-cli_fig\/fig1.png\"><img src=\"https:\/\/ykim.synology.me\/wordpress\/wp-json\/gh-readme\/v1\/asset?user=ykim2718&#038;repo=MLOps&#038;branch=main&#038;path=Ubuntu\/ubuntu-cli_fig\/fig1.png&#038;sig=f481d44569a373c6373a2d2e3ff1512f16fc8c96aae259e816632987c13d6e87\" width=\"720\" alt=\"Fig 1\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">Fig 1. SSH \ub294 client \uc640 server \uac00 \uc8fc\uace0\ubc1b\uc740 key \ub85c \ud1b5\uc2e0\uc744 \uc554\ud638\ud654\ud55c\ub2e4<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.2 Connection options<\/h3><a id=\"user-content-52-connection-options\" class=\"anchor\" aria-label=\"Permalink: 5.2 Connection options\" href=\"#52-connection-options\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Table 1. SSH \uc811\uc18d option<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Case<\/th>\n<th>Command<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\uae30\ubcf8 port (22)<\/td>\n<td><code>ssh user@192.168.0.10<\/code><\/td>\n<\/tr>\n<tr>\n<td>port \ubcc0\uacbd (\uc608: 2222)<\/td>\n<td><code>ssh -p 2222 user@192.168.0.10<\/code><\/td>\n<\/tr>\n<tr>\n<td>private key file (<code>.pem<\/code>, <code>id_rsa<\/code>)<\/td>\n<td><code>ssh -i \/path\/to\/key.pem user@192.168.0.10<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<hr>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix A. Terminology<\/h2><a id=\"user-content-appendix-a-terminology\" class=\"anchor\" aria-label=\"Permalink: Appendix A. Terminology\" href=\"#appendix-a-terminology\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li><strong>apt<\/strong>: Ubuntu \uc758 package manager. software package \ub97c \uc124\uce58\u00b7\uac31\uc2e0\u00b7\uc0ad\uc81c.<\/li>\n<li><strong>CLI<\/strong>: Command-line interface. terminal \uc5d0 \uc785\ub825\ud558\ub294 text \uba85\ub839 \ubc29\uc2dd.<\/li>\n<li><strong>daemon<\/strong>: terminal \uc5c6\uc774 background \uc5d0\uc11c \ub3c4\ub294 process. \ubcf4\ud1b5 \ubd80\ud305 \uc2dc \uc2dc\uc791.<\/li>\n<li><strong>dotfile<\/strong>: \uc774\ub984\uc774 <code>.<\/code> \uc73c\ub85c \uc2dc\uc791\ud558\ub294 file \uc774\ub098 directory. \uadf8\ub0e5 <code>ls<\/code> \ub85c\ub294 \ubcf4\uc774\uc9c0 \uc54a\uc74c.<\/li>\n<li><strong>GDM<\/strong>: GNOME Display Manager. Ubuntu desktop \uc758 \uadf8\ub798\ud53d \ub85c\uadf8\uc778 \ud654\uba74.<\/li>\n<li><strong>GID<\/strong>: Group ID. group \uc744 \uc2dd\ubcc4\ud558\ub294 \ubc88\ud638.<\/li>\n<li><strong>GNOME<\/strong>: Ubuntu \uc758 \uae30\ubcf8 desktop \ud658\uacbd.<\/li>\n<li><strong>GUI<\/strong>: Graphical user interface. window, icon, mouse \uc785\ub825 \ubc29\uc2dd.<\/li>\n<li><strong>home directory<\/strong>: \uc0ac\uc6a9\uc790\uc758 \uac1c\uc778 directory, <code>\/home\/&lt;USER&gt;<\/code>.<\/li>\n<li><strong>host key<\/strong>: SSH server \uac00 client \uc5d0\uac8c \uc790\uc2e0\uc744 \uc99d\uba85\ud558\ub294 key pair.<\/li>\n<li><strong>interface<\/strong>: host \uc758 network \uc5f0\uacb0 \uc9c0\uc810. \ubb3c\ub9ac \ub610\ub294 \uac00\uc0c1 (\uc608: <code>eth0<\/code>, <code>wlan0<\/code>, <code>lo<\/code>).<\/li>\n<li><strong>IP address<\/strong>: network \uc5d0\uc11c host \ub97c \uac00\ub9ac\ud0a4\ub294 \uc22b\uc790 \uc8fc\uc18c (\uc608: <code>192.168.0.10<\/code>).<\/li>\n<li><strong>LAN<\/strong>: Local area network. \uac19\uc740 local network \uad6c\uac04\uc758 host \ub4e4.<\/li>\n<li><strong>login shell<\/strong>: login \ud560 \ub54c \uc2dc\uc791\ub418\ub294 shell. \uc0ac\uc6a9\uc790\uc758 login profile \uc744 \uc77d\uc74c.<\/li>\n<li><strong>loopback<\/strong>: host \uac00 \uc790\uae30 \uc790\uc2e0\uc5d0 \uc811\uc18d\ud558\ub294 \uac00\uc0c1 interface <code>lo<\/code> (<code>127.0.0.1<\/code>).<\/li>\n<li><strong>MAC address<\/strong>: network interface \uc758 hardware \uc8fc\uc18c. \uc7a5\uce58\ub9c8\ub2e4 \uace0\uc815.<\/li>\n<li><strong>OpenSSH<\/strong>: Ubuntu \uc640 Windows \uc758 \ud45c\uc900 SSH \uad6c\ud604. server \ucabd package \ub294 <code>openssh-server<\/code>.<\/li>\n<li><strong>port<\/strong>: host \uc5d0\uc11c service \ub97c \uad6c\ubd84\ud558\ub294 0\u201365535 \uc0ac\uc774\uc758 \ubc88\ud638.<\/li>\n<li><strong>primary group<\/strong>: \uc0ac\uc6a9\uc790\uac00 \ub9cc\ub4dc\ub294 \uc0c8 file \uc5d0 \ubd99\ub294 group. \uc0ac\uc6a9\uc790\ub2f9 \ud558\ub098.<\/li>\n<li><strong>private key<\/strong>: key pair \uc911 \ube44\ubc00\uc778 \ucabd. \ubcf5\ud638\ud654\ub098 \uc11c\uba85\uc5d0 \uc4f0\uba70 \uacf5\uc720\ud558\uc9c0 \uc54a\uc74c.<\/li>\n<li><strong>public key<\/strong>: key pair \uc911 \uacf5\uac1c\ud558\ub294 \ucabd. \uc554\ud638\ud654\ub098 \uc11c\uba85 \uac80\uc99d\uc5d0 \uc500.<\/li>\n<li><strong>root<\/strong>: \ubaa8\ub4e0 \uad8c\ud55c\uc744 \uac00\uc9c4 superuser \uacc4\uc815 (UID 0).<\/li>\n<li><strong>service<\/strong>: systemd \uac00 \uad00\ub9ac\ud558\ub294 program. \ubcf4\ud1b5 daemon.<\/li>\n<li><strong>shell<\/strong>: \uc785\ub825\ud55c \uba85\ub839\uc744 \uc77d\uc5b4 \uc2e4\ud589\ud558\ub294 program (\uc608: <code>bash<\/code>).<\/li>\n<li><strong>Snap<\/strong>: app \uacfc \uadf8 \uc758\uc874\uc131\uc744 \ud55c\ub370 \ubb36\uc740 Canonical \uc758 package \ud615\uc2dd.<\/li>\n<li><strong>SSH<\/strong>: Secure Shell. \uc6d0\uaca9 login \uacfc \uba85\ub839 \uc2e4\ud589\uc744 \uc704\ud55c \uc554\ud638\ud654 protocol.<\/li>\n<li><strong>sudo<\/strong>: \ub2e4\ub978 \uba85\ub839\uc744 root \uad8c\ud55c\uc73c\ub85c \uc2e4\ud589\ud558\ub294 \uba85\ub839.<\/li>\n<li><strong>sudoers<\/strong>: \ub204\uac00 sudo \ub97c \uc4f8 \uc218 \uc788\ub294\uc9c0 \uc815\ud558\ub294 \uc124\uc815 file <code>\/etc\/sudoers<\/code>.<\/li>\n<li><strong>supplementary group<\/strong>: primary group \uc678\uc5d0 \uc0ac\uc6a9\uc790\uac00 \uc18d\ud55c \ucd94\uac00 group.<\/li>\n<li><strong>symlink<\/strong>: Symbolic link. \ub2e4\ub978 \uacbd\ub85c\ub97c \uac00\ub9ac\ud0a4\ub294 file.<\/li>\n<li><strong>systemd<\/strong>: Ubuntu \uc758 init system \uc774\uc790 service manager. <code>systemctl<\/code> \ub85c \uc81c\uc5b4.<\/li>\n<li><strong>target<\/strong>: service \ub4e4\uc744 \ud558\ub098\uc758 system \uc0c1\ud0dc\ub85c \ubb36\ub294 systemd unit (\uc608: <code>multi-user.target<\/code>).<\/li>\n<li><strong>TCP<\/strong>: SSH \uc640 \ub300\ubd80\ubd84\uc758 network service \uac00 \uc4f0\ub294 \uc5f0\uacb0 \uc9c0\ud5a5 transport protocol.<\/li>\n<li><strong>ufw<\/strong>: Uncomplicated Firewall. Ubuntu firewall \uc758 front end.<\/li>\n<li><strong>UID<\/strong>: User ID. \uc0ac\uc6a9\uc790 \uacc4\uc815\uc744 \uc2dd\ubcc4\ud558\ub294 \ubc88\ud638.<\/li>\n<li><strong>xinit<\/strong>: <code>startx<\/code> \ub97c \uc81c\uacf5\ud558\ub294 package. Ubuntu desktop \uc5d0\ub294 \uae30\ubcf8 \uc124\uce58\ub418\uc9c0 \uc54a\uc74c.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix B. Ubuntu Resource Optimization<\/h2><a id=\"user-content-appendix-b-ubuntu-resource-optimization\" class=\"anchor\" aria-label=\"Permalink: Appendix B. Ubuntu Resource Optimization\" href=\"#appendix-b-ubuntu-resource-optimization\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Ubuntu \ub97c \ub354 \uac00\ubccd\uace0 \ube60\ub974\uac8c \ub3cc\ub9ac\uae30 \uc704\ud574 CPU, RAM, disk \uc0ac\uc6a9\ub7c9\uc744 \uc904\uc774\ub294 \uc8fc\uc694 \ubc29\ubc95.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.1 Switch to CLI-only mode<\/h3><a id=\"user-content-b1-switch-to-cli-only-mode\" class=\"anchor\" aria-label=\"Permalink: B.1 Switch to CLI-only mode\" href=\"#b1-switch-to-cli-only-mode\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">server \ub098 terminal \uc704\uc8fc\ub85c \uc4f0\ub294 machine \uc5d0\uc11c\ub294 desktop GUI (GNOME) \ub97c \ub044\ub294 \uac83\ub9cc\uc73c\ub85c RAM \uc744 \uc57d 1\u20131.5 GB \uc774\uc0c1 \uc544\ub080\ub2e4.<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo systemctl set-default multi-user.target    # Boot into text (terminal) mode by default\nsudo systemctl set-default graphical.target     # Restore GUI mode at boot\nsudo reboot                                     # Reboot to apply the new default\"><pre>sudo systemctl set-default multi-user.target    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Boot into text (terminal) mode by default<\/span>\nsudo systemctl set-default graphical.target     <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Restore GUI mode at boot<\/span>\nsudo reboot                                     <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Reboot to apply the new default<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>\ub2e4\uc74c \ubd80\ud305\ubd80\ud130 \uc801\uc6a9. \uc7ac\ubd80\ud305\uc740 <code>sudo reboot<\/code>.<\/li>\n<li><code>startx<\/code> \u2014 \ud604\uc7ac session \uc5d0\ub9cc GUI \ub97c \ub744\uc6c0. \ub2e4\uc74c \ubd80\ud305\uc740 \uc5ec\uc804\ud788 text mode.<\/li>\n<li><code>sudo systemctl start gdm3<\/code> \u2014 <code>startx<\/code> \uac00 \uc5c6\uc744 \ub54c (<code>xinit<\/code> \ubbf8\uc124\uce58) \uadf8\ub798\ud53d \ub85c\uadf8\uc778 \ud654\uba74\uc744 \ub744\uc6c0.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.2 Disable unneeded boot services<\/h3><a id=\"user-content-b2-disable-unneeded-boot-services\" class=\"anchor\" aria-label=\"Permalink: B.2 Disable unneeded boot services\" href=\"#b2-disable-unneeded-boot-services\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ubd80\ud305 \uc2dc \uc2dc\uc791\ub418\ub294 background daemon \uc740 \uc4f0\uc9c0 \uc54a\uc544\ub3c4 memory \ub97c \ucc28\uc9c0\ud55c\ub2e4.<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"systemd-analyze blame                                  # Startup time taken by each service\nsystemctl list-units --type=service --state=running    # Services currently running\"><pre>systemd-analyze blame                                  <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Startup time taken by each service<\/span>\nsystemctl list-units --type=service --state=running    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Services currently running<\/span><\/pre><\/div>\n<p dir=\"auto\">\ud544\uc694 \uc5c6\uc774 \ucf1c\uc838 \uc788\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc740 service:<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo systemctl disable --now snapd.service snapd.socket    # Snap daemon, if no Snap apps are used\nsudo systemctl disable --now bluetooth.service             # Bluetooth, if unused\nsudo systemctl disable --now ModemManager.service          # Modem control, if no modem card is installed\nsudo systemctl disable --now cups.service                  # Printer support, if no printer is used\"><pre>sudo systemctl disable --now snapd.service snapd.socket    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Snap daemon, if no Snap apps are used<\/span>\nsudo systemctl disable --now bluetooth.service             <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Bluetooth, if unused<\/span>\nsudo systemctl disable --now ModemManager.service          <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Modem control, if no modem card is installed<\/span>\nsudo systemctl disable --now cups.service                  <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Printer support, if no printer is used<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>disable --now<\/code> \u2014 service \ub97c \uc989\uc2dc \uba48\ucd94\uace0 \ubd80\ud305 \uc2dc \uc2dc\uc791\ud558\uc9c0 \uc54a\uac8c \ud568.<\/li>\n<li>\ub2e4\uc2dc \ucf1c\ub824\uba74 <code>sudo systemctl enable --now &lt;SERVICE&gt;<\/code>.<\/li>\n<\/ul>\n<p dir=\"auto\"><code>disable --now<\/code> \ub294 <code>stop<\/code> \uacfc <code>disable<\/code> \uc744 \ub530\ub85c \uc2e4\ud589\ud558\ub294 \uac83\uacfc \uac19\ub2e4:<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo systemctl stop bluetooth       # Stop now\nsudo systemctl disable bluetooth    # Do not start at boot\"><pre>sudo systemctl stop bluetooth       <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Stop now<\/span>\nsudo systemctl disable bluetooth    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Do not start at boot<\/span><\/pre><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.3 Clean up unused packages and cache periodically<\/h3><a id=\"user-content-b3-clean-up-unused-packages-and-cache-periodically\" class=\"anchor\" aria-label=\"Permalink: B.3 Clean up unused packages and cache periodically\" href=\"#b3-clean-up-unused-packages-and-cache-periodically\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo apt autoremove --purge -y    # Remove unused dependency packages\nsudo apt clean                    # Delete the apt package cache to free disk space\"><pre>sudo apt autoremove --purge -y    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Remove unused dependency packages<\/span>\nsudo apt clean                    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Delete the apt package cache to free disk space<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>--purge<\/code> \u2014 \uc0ad\uc81c\ud55c package \uc758 \uc124\uc815 file \ub3c4 \ud568\uaed8 \uc81c\uac70.<\/li>\n<li><code>apt clean<\/code> \u2014 <code>\/var\/cache\/apt\/archives<\/code> \ub97c \ube44\uc6c0; \ub2e4\uc2dc \uc124\uce58\ud560 \ub54c package \ub97c \uc0c8\ub85c \ub0b4\ub824\ubc1b\uc74c.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix C. SSH Server Setup<\/h2><a id=\"user-content-appendix-c-ssh-server-setup\" class=\"anchor\" aria-label=\"Permalink: Appendix C. SSH Server Setup\" href=\"#appendix-c-ssh-server-setup\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">SSH \ub294 NoMachine \uacfc RustDesk \uac00 \uacf5\uc720\ud560 desktop \uc774 \uc5c6\ub294 text mode (<code>multi-user.target<\/code>) \uc5d0\uc11c\ub3c4 \uc6d0\uaca9 terminal \uc744 \uc900\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">C.1 Install and start the server<\/h3><a id=\"user-content-c1-install-and-start-the-server\" class=\"anchor\" aria-label=\"Permalink: C.1 Install and start the server\" href=\"#c1-install-and-start-the-server\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo apt install -y openssh-server    # Install the SSH server\nsudo systemctl enable --now ssh       # Start now and at every boot\nsystemctl status ssh                  # Expect: active (running)\"><pre>sudo apt install -y openssh-server    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Install the SSH server<\/span>\nsudo systemctl <span class=\"pl-c1\">enable<\/span> --now ssh       <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Start now and at every boot<\/span>\nsystemctl status ssh                  <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Expect: active (running)<\/span><\/pre><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">C.2 Open the firewall<\/h3><a id=\"user-content-c2-open-the-firewall\" class=\"anchor\" aria-label=\"Permalink: C.2 Open the firewall\" href=\"#c2-open-the-firewall\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo ufw status                       # Check whether the firewall is active\nsudo ufw allow ssh                    # Allow port 22 when it is active\"><pre>sudo ufw status                       <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Check whether the firewall is active<\/span>\nsudo ufw allow ssh                    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Allow port 22 when it is active<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>Status: inactive<\/code> \u2014 \uaddc\uce59 \ucd94\uac00 \ubd88\ud544\uc694.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">C.3 Connect from Windows<\/h3><a id=\"user-content-c3-connect-from-windows\" class=\"anchor\" aria-label=\"Permalink: C.3 Connect from Windows\" href=\"#c3-connect-from-windows\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Windows 10 \uacfc 11 \uc5d0\ub294 OpenSSH client \uac00 \ub4e4\uc5b4 \uc788\ub2e4. PowerShell \uc5d0\uc11c \uc2e4\ud589\ud55c\ub2e4:<\/p>\n<div class=\"highlight highlight-source-powershell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"ssh &lt;USER&gt;@&lt;SERVER_IP&gt;                # Answer yes to trust the host key on first login\"><pre>ssh <span class=\"pl-k\">&lt;<\/span>USER<span class=\"pl-k\">&gt;<\/span>@<span class=\"pl-k\">&lt;<\/span>SERVER_IP<span class=\"pl-k\">&gt;<\/span>                <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Answer yes to trust the host key on first login<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li><code>&lt;SERVER_IP&gt;<\/code> \u2014 server \uc5d0\uc11c <code>hostname -I<\/code> \ub85c \ud655\uc778.<\/li>\n<li>port \uc640 key file option \u2014 Table 1.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">C.4 Log in with a key (optional)<\/h3><a id=\"user-content-c4-log-in-with-a-key-optional\" class=\"anchor\" aria-label=\"Permalink: C.4 Log in with a key (optional)\" href=\"#c4-log-in-with-a-key-optional\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"highlight highlight-source-powershell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"ssh-keygen -t ed25519                 # Create a key pair on the client\ntype $env:USERPROFILE\\.ssh\\id_ed25519.pub | ssh &lt;USER&gt;@&lt;SERVER_IP&gt; &quot;mkdir -p ~\/.ssh &amp;&amp; cat &gt;&gt; ~\/.ssh\/authorized_keys&quot;    # Copy the public key to the server\"><pre>ssh<span class=\"pl-k\">-<\/span>keygen <span class=\"pl-k\">-<\/span>t ed25519                 <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Create a key pair on the client<\/span>\ntype <span class=\"pl-smi\">$<span class=\"pl-c1\">env:<\/span>USERPROFILE<\/span>\\.ssh\\id_ed25519.pub <span class=\"pl-k\">|<\/span> ssh <span class=\"pl-k\">&lt;<\/span>USER<span class=\"pl-k\">&gt;<\/span>@<span class=\"pl-k\">&lt;<\/span>SERVER_IP<span class=\"pl-k\">&gt;<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>mkdir -p ~\/.ssh &amp;&amp; cat &gt;&gt; ~\/.ssh\/authorized_keys<span class=\"pl-pds\">\"<\/span><\/span>    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Copy the public key to the server<\/span><\/pre><\/div>\n<ul dir=\"auto\">\n<li>\uc774\ud6c4 login \uc740 \ube44\ubc00\ubc88\ud638\ub97c \ubb3b\uc9c0 \uc54a\uc74c.<\/li>\n<\/ul>\n<\/article><\/div><\/div><\/p>\n<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>An Ubuntu command reference grouped by what is being administered: users, files and permissions, network, sudo and SSH. It prefers the interactive adduser and deluser over useradd and userdel, and an appendix lists ways to cut CPU, RAM and disk use, starting with booting into text mode.<\/p>\n","protected":false},"author":4,"featured_media":7206,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","fifu_image_url":"","fifu_image_alt":"","iawp_total_views":15,"footnotes":""},"categories":[10,452],"tags":[386],"class_list":["post-7205","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-slug","category-ubuntu-slug","tag-github-hosted"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":0,"sum_votes":0},"jetpack_featured_media_url":"https:\/\/ykim.synology.me\/wordpress\/wp-content\/uploads\/2026\/09\/green-limes-produce-bin.jpg","_links":{"self":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/comments?post=7205"}],"version-history":[{"count":1,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7205\/revisions"}],"predecessor-version":[{"id":7207,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7205\/revisions\/7207"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media\/7206"}],"wp:attachment":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media?parent=7205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/categories?post=7205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/tags?post=7205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}