{"id":444,"date":"2017-01-08T18:27:12","date_gmt":"2017-01-08T18:27:12","guid":{"rendered":"https:\/\/visworlditsolution.wordpress.com\/?p=444"},"modified":"2017-01-08T18:27:12","modified_gmt":"2017-01-08T18:27:12","slug":"how-to-create-swap-file-in-redhatlinux-server","status":"publish","type":"post","link":"https:\/\/linux.thingsomething.com\/index.php\/2017\/01\/08\/how-to-create-swap-file-in-redhatlinux-server\/","title":{"rendered":"How to create swap file in RedhatLinux Server"},"content":{"rendered":"<p>hello, guys today i will tell you how can we create the swap file in a Linux .swap is part of virtual part of heard disk. \u00a0basically, swap part is a system \u00a0used like RAM .so if we create swap file \u00a0or\u00a0partition .if \u00a0we can increase our system swap memory step<\/p>\n<p><span style=\"color:#ff0000;\"><strong>step 1- before we create any file and then we convert in swap memory kile this\u00a0<\/strong><\/span><br \/>\n#touch a.txt \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0(a.txt is filename )<\/p>\n<p>#dd if=\/dev\/zero of=a.txt bs=1M count=1000<\/p>\n<p><strong>here we format swap file<\/strong><\/p>\n<p>#mkswap a.txt<\/p>\n<p><strong>here we will below commands through on swap<\/strong><\/p>\n<p>#swapon a.txt<\/p>\n<p><strong>we will check below commands<\/strong><\/p>\n<p>#free -m<\/p>\n<p><strong>then we will permanent swap file<\/strong><\/p>\n<p># vim \/etc\/fstab \u00a0 \u00a0(<span style=\"color:#ff0000;\">note -here we will go to insert mod through (i) commands and we will save ( press Ese then press :wq)<\/span><\/p>\n<p><span style=\"color:#008000;\">\/root\/file swaps \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 swpas \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 default \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00 0<\/span><\/p>\n<p>:wq \u00a0 (then save to swap file )<\/p>\n<p>Thank you<\/p>\n<p>by vishnu sharma<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>hello, guys today i will tell you how can we create the swap file in a Linux .swap is part of virtual part of heard &hellip; <span class=\"ml-btn\"><a href=\"https:\/\/linux.thingsomething.com\/index.php\/2017\/01\/08\/how-to-create-swap-file-in-redhatlinux-server\/\" class=\"more-link\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[8,16],"tags":[114,155,240],"class_list":["post-444","post","type-post","status-publish","format-standard","hentry","category-linux-rhel5","category-storage","tag-how-to-create-swap-file","tag-how-to-permanent-mount-swap-file","tag-what-is-swap-file"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/444"}],"collection":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/comments?post=444"}],"version-history":[{"count":0,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/444\/revisions"}],"wp:attachment":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/media?parent=444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/categories?post=444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/tags?post=444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}