{"id":21443,"date":"2023-09-30T11:27:35","date_gmt":"2023-09-30T11:27:35","guid":{"rendered":"https:\/\/linuxways.net\/?p=21443"},"modified":"2023-09-30T11:27:35","modified_gmt":"2023-09-30T11:27:35","slug":"how-do-i-check-and-access-files-on-my-sd-card-in-linux-ubuntu","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-do-i-check-and-access-files-on-my-sd-card-in-linux-ubuntu\/","title":{"rendered":"How do I Check and Access Files on my SD Card in Linux\/Ubuntu?"},"content":{"rendered":"<p>An <strong>SD Card<\/strong> is a storage drive that is widely used in various devices like Cameras and Phones. SD Cards are portable storage devices providing a high data transfer rate. SD Cards can also be used in Linux Distributions like Ubuntu for file and data transfer.<\/p>\n<p>This article discusses the process of how you can access the SD Card files in Linux-based Ubuntu.<\/p>\n<h2><strong>How Do I Check and Access Files on My SD Card in Linux\/Ubuntu?<\/strong><\/h2>\n<p>Linux offers many ways to do different tasks related to SD cards. There are different methods you can use to access the files, check their status, and verify the file system integrity of your SD Card in Linux.<\/p>\n<h3><strong>Method 1: Use the \u201clsblk\u201d Command to Check the Mounted SD Card<\/strong><\/h3>\n<p>The \u201c<strong>lsblk<\/strong>\u201d command lists the device storage and any secondary storage device like SD Cards attached to your System. The \u201clsblk\u201d command is used as:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">lsblk<\/div><\/div>\n<p>This will show the storage type, size, name, and \u201cMOUNTPOINTS\u201d of your storage devices:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"488\" class=\"wp-image-21444\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-1.png 729w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-1-300x201.png 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/p>\n<p>Using the same above command, once you <strong>Insert the SD Card<\/strong>, you can see it in the list:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"722\" height=\"495\" class=\"wp-image-21445\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-2.png 722w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-2-300x206.png 300w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/p>\n<h3><strong>Method 2: Use the \u201cfdisk\u201d Command to Check Mounted SD Card<\/strong><\/h3>\n<p>The \u201c<strong>fdisk<\/strong>\u201d command allows us to view and manipulate the primary and secondary storage devices on our system. To list all the devices, enter the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">fdisk<\/span> <span class=\"re5\">-l<\/span><\/div><\/div>\n<p>This will display all the partitions and their file system as well:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"478\" class=\"wp-image-21446\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-3.png 727w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-3-300x197.png 300w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/p>\n<p>Scroll down in the list and you can find your SD Card in the \u201cDevices\u201d with the path \u201c\/dev\/sdcX\u201d. The \u201cX\u201d varies from system to system:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"319\" class=\"wp-image-21447\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-4.png 728w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-4-300x131.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>Here we have our SD Card details having a size of 3.7GB and a file system of FAT32. To check the complete details of our SD Card, use the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">fdisk<\/span> <span class=\"re5\">-l<\/span> <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>sdc<\/div><\/div>\n<p>The \u201csdc\u201d can vary on your system, for now running the command will give additional details:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"223\" class=\"wp-image-21448\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-5.png 726w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-5-300x92.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/p>\n<h3><strong>Method 3: Use the \u201cfsck\u201d Command to Check Mounted SD Card<\/strong><\/h3>\n<p>The \u201cfsck\u201d command can also be used to check for mounted devices on your Ubuntu system using the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> fsck<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"153\" class=\"wp-image-21449\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-6.png 728w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-6-300x63.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>It will also detect and fix file system errors if they happen. To check for any file system errors in your SD Card, run the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> fsck <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>sdc1<\/div><\/div>\n<p>The \u201csdc1\u201d can vary on your system. Once the command executes, the details will be displayed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"199\" class=\"wp-image-21450\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-7.png 734w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-7-300x81.png 300w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/p>\n<p>If the SD Card is not properly unmounted or it has some issues, it will ask for some actions to be performed. These actions are asked in a sequence and depending on your choice, you can improve the integrity:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"191\" class=\"wp-image-21451\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-8.png 724w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-8-300x79.png 300w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/p>\n<h3><strong>Method 4: Use the GUI to Check the Mounted SD Card and Files on the SD Card<\/strong><\/h3>\n<p>The SD Card Mounted can be seen on the left side taskbar as well as in the shortcuts menu. In our case, it is displayed as \u201cNew Volume\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"870\" height=\"653\" class=\"wp-image-21452\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-9.png 870w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-9-300x225.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-9-768x576.png 768w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\" \/><\/p>\n<p>Click on the New Volume Drive to access the SD Card. Once clicked, you will see the SD Card files Window:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1574\" height=\"485\" class=\"wp-image-21453\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-10.png 1574w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-10-300x92.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-10-1024x316.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-10-768x237.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-10-1536x473.png 1536w\" sizes=\"auto, (max-width: 1574px) 100vw, 1574px\" \/><\/p>\n<p>You can access the files and directories in the SD Card from here now.<\/p>\n<h2><strong>How to Access Files on the SD Card in Ubuntu?<\/strong><\/h2>\n<p>To access the files on your SD Card once it is mounted and you can see it on your terminal after running the commands above, create a Folder and then mount that directory. For a detailed explanation of how to create a mount point and then mount the SD Card to it, read the step-by-step procedure here: <a href=\"https:\/\/linuxways.net\/de\/Ubuntu\/mount-sd-card-in-linux-ubuntu\/\">Mount SD Card in Ubuntu<\/a>.<\/p>\n<p>Once the SD Card is mounted, navigate to the \u201cmnt\u201d directory using the \u201ccd\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">cd<\/span> <span class=\"sy0\">\/<\/span>mnt<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"62\" class=\"wp-image-21455\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-11.png 732w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-11-300x25.png 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/p>\n<p>Once you are inside the directory, use the command below to list and access the files on your SD Card:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">ls<\/span><\/div><\/div>\n<p>This will display all the files on your SD Card and you can access them:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"733\" height=\"234\" class=\"wp-image-21456\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-12.png 733w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-12-300x96.png 300w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><\/p>\n<p>Now we can access the files in the SD Card. For instance, to access the file \u201cLog.txt\u201d in the above list, use the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">nano<\/span> Log.txt<\/div><\/div>\n<p>This will open the \u201cLog.txt\u201d file in the nano editor:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"452\" class=\"wp-image-21457\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-13.png 726w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21443-13-300x187.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/p>\n<p>That\u2019s all about checking and accessing the files on the SD card in Ubuntu.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>To access files, check the status of SD Cards, and verify the integrity of your SD cards. For this purpose, you can use different approaches in Ubuntu, such as using the \u201clsblk\u201d command, the \u201csudo fdisk -l\u201d command, GUI, etc. In this article, we have seen how by verifying the presence of an SD Card using different methods, we can access files and folders in our SD Card.<\/p>","protected":false},"excerpt":{"rendered":"<p>Check the status of SD Cards, ensure the presence of SD Cards, and verify their integrity using either of the three methods offered by Ubuntu. <\/p>","protected":false},"author":110,"featured_media":21454,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-21443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/21443","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\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=21443"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/21443\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/21454"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=21443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=21443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=21443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}