{"id":201,"date":"2020-12-08T12:59:56","date_gmt":"2020-12-08T11:59:56","guid":{"rendered":"http:\/\/fred151.net\/site\/?p=201"},"modified":"2021-01-01T13:11:19","modified_gmt":"2021-01-01T12:11:19","slug":"hardening-desktop-linux-kubuntu","status":"publish","type":"post","link":"https:\/\/fred151.net\/site\/2020\/12\/08\/hardening-desktop-linux-kubuntu\/","title":{"rendered":"Hardening desktop Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">At every new installation of Linux (Kubuntu) i will set some performance and stable optimizations.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use ramdisk to mount the \/tmp folder<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have a SSD is important to limit the write operations for a better disk life. So let&#8217;s use mount the tmp folder in RAM.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># nano \/etc\/fstab\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n[...]\n\/swapfile &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;none &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swap &nbsp;&nbsp;&nbsp;sw &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0\n<strong>tmpfs &nbsp;&nbsp;\/tmp &nbsp;&nbsp;&nbsp;tmpfs &nbsp;&nbsp;defaults,noatime,nosuid,mode=1777,size=8G &nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0<\/strong><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Append the bold line and adjust the <strong>size<\/strong> as half of your RAM. So if you have 16GB of RAM then limit the tmp folder up to 8GB.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Disable splash screen at boot<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The correct way to disable the splash screen, even will future Grub updated, is to edit the default configuration.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># nano \/etc\/default\/grub\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n[...]\nGRUB_DEFAULT=0\nGRUB_TIMEOUT_STYLE=hidden\nGRUB_TIMEOUT=10\nGRUB_DISTRIBUTOR=`lsb_release -i -s 2&gt; \/dev\/null || echo Debian`\n<strong>GRUB_CMDLINE_LINUX_DEFAULT=\"quiet splash\"<\/strong>\nGRUB_CMDLINE_LINUX_DEFAULT=\"\"\nGRUB_CMDLINE_LINUX=\"\"\n[...] <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete the &#8220;quiet splash&#8221; from the Grub command line and save the file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[...]\nGRUB_CMDLINE_LINUX_DEFAULT=\"\"\n[...]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Regenerate the grub.cfg with the command update-grub2.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># update-grub2<\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Disable the login KDE splash screen<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Kunbuntu 18.04 the theme breeze has a annoying bug.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command (press ALT+F2) to open the splashscreen configuration<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/bin\/kcmshell5 kcm_splashscreen<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Select &#8220;none&#8221; and after &#8220;apply&#8221;.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Disable Baloo file indexing<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have and SSD is also raccomended to&nbsp; disable Baloo file indexing to increase the performance.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># balooctl disable\n# killall baloo_file<\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At every new installation of Linux (Kubuntu) i will set some performance and stable optimizations. Use ramdisk to mount the \/tmp folder If you have a SSD is important to limit the write operations for a better disk life. So let&#8217;s use mount the tmp folder in RAM. # nano \/etc\/fstab &#8211; &#8211; &#8211; &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":331,"comment_status":"closed","ping_status":"open","sticky":false,"template":"templates\/template-full-width.php","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-201","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sysadmin"],"_links":{"self":[{"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/comments?post=201"}],"version-history":[{"count":8,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/posts\/201\/revisions\/371"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/media\/331"}],"wp:attachment":[{"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fred151.net\/site\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}