{"id":633,"date":"2022-11-02T10:34:06","date_gmt":"2022-11-02T02:34:06","guid":{"rendered":"https:\/\/heoffice.com\/?p=633"},"modified":"2022-12-01T21:28:43","modified_gmt":"2022-12-01T13:28:43","slug":"linux-command-vs","status":"publish","type":"post","link":"https:\/\/heoffice.com\/?p=633","title":{"rendered":"Linux command VS"},"content":{"rendered":"\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td><strong>Description<\/strong><\/td><td><strong>CentOS<\/strong> 8<\/td><td><strong>Ubuntu<\/strong> 20<\/td><td><strong>Docker<\/strong><\/td><\/tr><tr><td>package manager<\/td><td>yum<\/td><td>apt<\/td><td>apk<\/td><\/tr><tr><td>Update<\/td><td>yum update -y<\/td><td>apt update<\/td><td>apk update<\/td><\/tr><tr><td>Check OS version<\/td><td>cat \/etc\/redhat-release<br>cat \/proc\/version <\/td><td>cat \/etc\/issue<br>cat \/proc\/version<\/td><td>cat \/etc\/issue<br>cat \/proc\/version<\/td><\/tr><tr><td>Install aws-cli<\/td><td>dnf install python3-pip<br>pip3 install awscli<\/td><td>apt-get install\u00a0awscli<\/td><td>apk add &#8211;no-cache aws-cli<\/td><\/tr><tr><td>Install wget<\/td><td>yum install wget<\/td><td>apt-get install wget<\/td><td>&#8211;<\/td><\/tr><tr><td>Install curl<\/td><td>&#8211;<\/td><td>apt-get install curl<\/td><td>apk add curl<\/td><\/tr><tr><td>Check port<\/td><td>netstat -tunlp | grep 8000<\/td><td>netstat -tunlp | grep 8000<\/td><td>netstat -tunlp | grep 8000<\/td><\/tr><tr><td><\/td><td>lsof -i:80<\/td><td>lsof -i:80<\/td><td>lsof -i:80<\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Centos install error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@2b7f05b55efb \/]# yum install wget\nFailed to set locale, defaulting to C.UTF-8\nCentOS Linux 8 - AppStream                                                               96  B\/s |  38  B     00:00\nError: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist\n&#91;root@2b7f05b55efb \/]# sudo sed -i -e \"s|mirrorlist=|#mirrorlist=|g\" \/etc\/yum.repos.d\/CentOS-*\nbash: sudo: command not found<\/code><\/pre>\n\n\n\n<p>To resolve this issue:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@2b7f05b55efb \/]# sed -i -e \"s|mirrorlist=|#mirrorlist=|g\" \/etc\/yum.repos.d\/CentOS-*\n&#91;root@2b7f05b55efb \/]# sed -i -e \"s|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g\" \/etc\/yum.repos.d\/CentOS-*<\/code><\/pre>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description CentOS 8 Ubuntu 20 Docker package manager y&#8230;<\/p>\n","protected":false},"author":1,"featured_media":333,"comment_status":"closed","ping_status":"open","sticky":false,"template":"elementor_header_footer","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[54,1],"tags":[],"class_list":["post-633","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shell","category-web"],"acf":[],"_links":{"self":[{"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/posts\/633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=633"}],"version-history":[{"count":13,"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/posts\/633\/revisions"}],"predecessor-version":[{"id":690,"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/posts\/633\/revisions\/690"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/media\/333"}],"wp:attachment":[{"href":"https:\/\/heoffice.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}