{"id":829,"date":"2020-10-22T17:57:00","date_gmt":"2020-10-22T17:57:00","guid":{"rendered":"https:\/\/linuxways.net\/?p=829"},"modified":"2020-11-25T10:06:58","modified_gmt":"2020-11-25T10:06:58","slug":"how-to-install-mongodb-on-linux-mint-20","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/mint\/how-to-install-mongodb-on-linux-mint-20\/","title":{"rendered":"How to install MongoDB on Linux Mint 20"},"content":{"rendered":"<h2>Introduction:<\/h2>\n<p>MongoDB is a very popular NoSQL database that can be used with both Linux and Windows operating systems. This database is specially designed to be cross-platform and it is highly document-oriented. The documents of MongoDB follow the JSON structure and also offer optional schemas. Basically, the data in this database is stored in the form of documents. In this article, we aim to demonstrate to you the complete procedure of installing MongoDB on Linux.<\/p>\n<p><strong>Note: We have used Linux Mint 20 to demonstrate the process of installation.<\/strong><\/p>\n<h2>Method of Installing MongoDB on Linux:<\/h2>\n<p>For having MongoDB installed on your Linux Mint 20 system, you are required to perform all the steps shown below:<\/p>\n<h3>Step # 1: Updating Linux Mint 20 System Cache:<\/h3>\n<p>For updating your Linux Mint 20 system cache, you should first launch the terminal by clicking on its icon. The terminal of Linux Mint 20 is shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"95\" class=\"wp-image-830\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-438.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-438.png 652w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-438-300x44.png 300w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/p>\n<p>After launching your terminal, run the command stated below in it:<\/p>\n<pre><strong>sudo apt update<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"372\" height=\"24\" class=\"wp-image-831\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-439.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-439.png 372w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-439-300x19.png 300w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/strong><\/p>\n<p>When your system cache has been successfully updated, your Linux Mint 20 system will cause the terminal to display the following output on it:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"575\" height=\"263\" class=\"wp-image-832\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-440.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-440.png 575w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-440-300x137.png 300w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/p>\n<h3>Step # 2: Installing MongoDB on Linux Mint 20:<\/h3>\n<p>After updating our system, we are all set to install on it by running the command stated below in our terminal:<\/p>\n<pre><strong>sudo apt install mongodb<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"24\" class=\"wp-image-833\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-441.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-441.png 444w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-441-300x16.png 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/strong><\/p>\n<p>During the execution of this command, as soon as you will be asked to provide confirmation for this action, you need to press \u201cY\u201d for carrying on smoothly with your installation as highlighted in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"606\" height=\"282\" class=\"wp-image-834\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-442.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-442.png 606w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-442-300x140.png 300w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/p>\n<p>Once MongoDB has been successfully installed on your Linux Mint 20 system, your system will cause the terminal to display the output shown in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"382\" class=\"wp-image-835\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-443.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-443.png 645w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-443-300x178.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<h3>Step # 3: Checking the Status of MongoDB:<\/h3>\n<p>Now we need to check whether the installation on Linux Mint 20 has also caused it to start automatically or not. This can be checked by running the following command in our terminal:<\/p>\n<pre><strong>sudo systemctl status mongodb<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"483\" height=\"31\" class=\"wp-image-836\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-444.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-444.png 483w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-444-300x19.png 300w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/strong><\/p>\n<p>When you will run this command, the status will appear on your terminal which is also highlighted in the image shown below. With this, you can verify that the MongoDB service is active and running.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"648\" height=\"228\" class=\"wp-image-837\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-445.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-445.png 648w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-445-300x106.png 300w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/p>\n<h3>Step # 4: Accessing MongoDB in Linux Mint 20:<\/h3>\n<p>After verifying that the MongoDB service is active and running, we can easily access it by running the following command in our terminal:<\/p>\n<pre><strong>mongo<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"291\" height=\"25\" class=\"wp-image-838\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-446.png\"><\/strong><\/p>\n<p>Running this command will display the MongoDB shell on your terminal if it has been successfully installed on your Linux Mint 20 system as shown in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"411\" class=\"wp-image-839\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-447.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-447.png 646w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/10\/word-image-447-300x191.png 300w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/p>\n<h2>Conclusion:<\/h2>\n<p>By following all the steps listed in this article, one can easily have MongoDB installed on his Linux Mint 20 system, can check its status, and can also access its shell to pass commands to this database. The process described in this article is extremely simple to follow. Moreover, all the commands in it get executed successfully just within a few minutes.<\/p>\n<p><a href=\"https:\/\/linuxways.net\/de\/mint\/select-update-delete-create-alter-and-drop-table-in-mongodb\/\">In my next article, I will show you how you can create, update, alter, and drop a table in this newly installed database.&nbsp;&nbsp;<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction: MongoDB is a very popular NoSQL database that can be used with both Linux and Windows operating systems. This database is specially designed to be cross-platform and&hellip;<\/p>","protected":false},"author":3,"featured_media":1569,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[45,44],"class_list":["post-829","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mint","tag-linux-mint","tag-mongodb"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=829"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/829\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/1569"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}