How to clear RAM Memory Cache, Buffer and Swap Space on Linux

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 41

  • @lkhi801
    @lkhi801 5 лет назад +30

    what monster uses light mode in terminal

  • @nicholasbatte5560
    @nicholasbatte5560 4 года назад +2

    Wow. Very useful.

  • @ashishgoswami7561
    @ashishgoswami7561 3 года назад +2

    Thanks bro.........great help.......

    • @linuxhelp5096
      @linuxhelp5096  3 года назад

      Thanks for the feedback :-)
      For more topics subscribe to our channel,
      ruclips.net/channel/UCvTQ6WM-MSvCFVNCEtI6HPg

  • @juslike2322
    @juslike2322 4 года назад +1

    thanks linux help. can you make a video describing the installation of different desktop environments over a given distribution. Thanks

  • @namepassword2106
    @namepassword2106 7 лет назад +4

    Good instructions, but stupid to use for free memory. Setting swappiness up correctly would be best.

    • @danishnoman2042
      @danishnoman2042 6 лет назад +2

      How can we set the swappiness?

    • @a3-82
      @a3-82 Год назад +1

      after 5years
      and you can't still answer this question

  • @kunalkrsinha38
    @kunalkrsinha38 Год назад

    Bro... What is echo 1, echo 2, and why are we used it?

    • @linuxhelp5096
      @linuxhelp5096  Год назад +1

      1.In Linux, the "echo" command is used to display a message on the screen or write to a file. When we use "echo 1" or "echo 2" to clear RAM Memory Cache, Buffer and Swap Space, we are actually writing a specific value to a system file, which triggers the kernel to perform a specific action.
      Here's what the values "1" and "2" represent:
      2.Clear PageCache, dentries, and inodes
      The command "echo 1 > /proc/sys/vm/drop_caches" will clear the PageCache, dentries, and inodes in the Linux kernel. The PageCache holds recently used files and directories, while the dentries and inodes hold metadata about files and directories. Clearing these caches can free up memory on the system.
      3.Clear PageCache, dentries, inodes and Swap Space
      The command "echo 2 > /proc/sys/vm/drop_caches" will clear the PageCache, dentries, inodes, and Swap Space. The Swap Space is an area on the hard drive that the kernel uses as a last resort when the RAM memory is full. Clearing the Swap Space can also help free up memory.
      4.It's important to note that clearing caches can be risky and may cause performance issues. It's generally not recommended unless you know what you're doing and have a specific reason for doing it.
      For more topics subscribe to our channel,
      ruclips.net/channel/UCvTQ6WM-MSvCFVNCEtI6HPg

  • @wargone540
    @wargone540 Год назад

    Thanks man.

    • @linuxhelp5096
      @linuxhelp5096  Год назад

      Glad it helped! Thanks for the feedback :-)
      For more topics subscribe to our channel,
      ruclips.net/channel/UCvTQ6WM-MSvCFVNCEtI6HPg

    • @wargone540
      @wargone540 Год назад +1

      @@linuxhelp5096 Thanks, I do that currently ;)

  • @williambutcher782
    @williambutcher782 Год назад

    Super bro

    • @linuxhelp5096
      @linuxhelp5096  Год назад

      Thanks for the feedback :-)
      For more topics subscribe to our channel,
      ruclips.net/channel/UCvTQ6WM-MSvCFVNCEtI6HPg

  • @vijjitful
    @vijjitful 7 лет назад +2

    what does sync: echo 1,2,3 do ?????

    • @ravenkavoori
      @ravenkavoori 5 лет назад +7

      echo 1 = Free pagecache only.
      echo 2 = Free dentries and inodes.
      echo 3 = Free pagecache, dentries and inodes

  • @eqqx1108
    @eqqx1108 4 года назад +2

    permission denied, how to solve?

    • @csof7612
      @csof7612 4 года назад +2

      You need to be a super user. Type Sudo before hand in most cases, but looking at the video, looks like buddy is just using su only.
      Type su, hit enter. Enter your admin password (not your user password). You should be in the proper mode now. Don't do anything in this mode you think you might regret.

    • @mohammedakmal9592
      @mohammedakmal9592 7 месяцев назад

      you can use also use this command to enter root mode it will garentee all things
      sudo su
      and then type the commands

  • @gtookami3832
    @gtookami3832 4 года назад +1

    I have a vps with Plesk on it, I only have more than 140mb of RAM ...
    I was interested in following this tutorial ... but ... could they create problems with Plesk or my work?

  • @hunkmujeeb
    @hunkmujeeb 7 лет назад +4

    does it kill any process?

    • @serazummunirz
      @serazummunirz 6 лет назад +1

      Proberbly. Specially restarting the swap when it's used by any program.

    • @csof7612
      @csof7612 4 года назад +1

      Maybe? Otherwise, just use "kill" or "xkill" if you want to be able to click on what you want to go bye bye.

  • @Rad1ation
    @Rad1ation 23 дня назад

    Bro just has 1Gig ram and uses lightmode terminal

    • @linuxhelp5096
      @linuxhelp5096  20 дней назад

      Yes it is enough to work with terminal

  • @handigeharrie4354
    @handigeharrie4354 6 лет назад +1

    does not work

  • @AyushSingh-uj5nl
    @AyushSingh-uj5nl 4 года назад +1

    After entering echo 1 command , getting error msg of permission denied

    • @ramkrishnaadhikari5918
      @ramkrishnaadhikari5918 4 года назад +1

      Same here. Do you get the solution??

    • @techzone2009
      @techzone2009 3 года назад +1

      @@ramkrishnaadhikari5918 sudo hala Ani kam hunxa

    • @worldonlinux1139
      @worldonlinux1139 2 года назад

      you must be a root, sudo will not work either

    • @adilhashmi1735
      @adilhashmi1735 2 года назад

      first type sudo -i $ will become # then type

    • @utkarsh6847
      @utkarsh6847 2 года назад

      @@ramkrishnaadhikari5918 i can help you
      type sudo root passwd root
      then type password

  • @blondefinn7124
    @blondefinn7124 3 года назад +2

    oh I appreciate the video, I wish I could understand what the guy is saying. Very unfortunate

  • @govindarajusourirajan3194
    @govindarajusourirajan3194 4 года назад +1

    Release my phone memory