Linux CLI Terminal: Free Memory & Free Disk Space

How to Check Free Memory Space on Linux

========

How to Check Free Memory Space on Linux [Terminal]

==================================

Method 1: Using meminfo

cat /proc/meminfo

grep MemTotal /proc/meminfo

=================
=================

Method 2: Using free, top and Other Commands
1
Typing free in your command terminal provides the following result:
free
2
Use:
top
htop
3
Provides general information about processes, memory, paging, block IO, traps, and CPU activity.
vmstat

=================

How to Check Free Disk Space on Linux

========

How to Check Free Disk Space on Linux [Terminal]

==================================

Method 1: Using df 
The df command stands for disk-free and quite obviously, it shows you the free and available disk space on Linux systems.
1
With -h option, it shows the disk space in human-readable format (MB and GB).
df -h
2
View the disk usage with more details like filesystem type and blocks, you can use the command:
df -T
3
Shows the file system's complete disk usage even if the Available field is 0
df -a 

=================

Method 2: Using du, ls, and Other Commands
While df command is quite popular and should be enough for the use case, there are other alternatives that you can try including:

du -h → Shows disk usage in human-readable format for all directories and subdirectories.
du -a →Shows disk usage for all files.
du -s Provides the total disk space used by a particular file or directory.
ls -al →Lists the entire contents, along with their size, of a particular directory.
stat <file/directory> →Displays the size and other stats of a file/directory or a file system.
fdisk -l →Shows disk size along with disk partitioning information (may require sudo privileges).
dust  → An interesting alternative to the du command written in Rust, available for Arch Linux in the repositories. For other Linux distros, you can refer to its GitHub releases section.

=================

Useful Notes – Ubuntu/Ubuntu Studio 22.04 LTS “Jammy Jellyfish”

I use Ubuntu Studio 22.04 LTS “Jammy Jellyfish” because comes with many-many preinstalled Apps.

Main Things to do after installing Ubuntu Studio 22.04 LTS “Jammy Jellyfish”
========

I have chosen Ubuntu Studio 22.04 LTS because I do Graphic and Video Editing along with my main Programming work…
[Support: Ubuntu Studio 22.04 LTS (Jammy Jellyfish) will be supported for 3-years until April 2025.]
[Note: Ubuntu 22.04 LTS is supported for 5-years.] 
[Direct upgrades to Ubuntu Studio 22.04 from supported versions prior to 21.10 are not supported.]

Main Things To Do:

  1. Get your system ready with updates and repositories. Get familiar with auto-updates [Software & Updates, Software Center]
    sudo apt update && sudo apt upgrade
  2. Install applications of your choice from the software center, mainly Programming IDEs/Editors, because Content Creation Apps are come preinstalled already in Ubuntu Studio.  
    https://linuxconfig.org/things-to-install-on-ubuntu-20-04 
    [ COMPLETE GUIDE FOR MANY-MANY SOFTWARE Apps INSTALLATION ]
  3. Give your Ubuntu OS a different color [ Settings > Appearance ]
  4. Get familiar with the new screenshot tool. [ When you press the Print Screen button to take the screenshot, it opens the UI and gives you the option to take the screenshot of the selected area, entire screen, or current application window. ]
  5. Know about cleaning your system. The classic apt autoremove command is a good way to remove packages that are not required anymore. https://linuxhint.com/why_apt_get_clean/
    sudo apt autoremove
  6. Master the keyboard shortcuts
    Ctrl + Alt + T: Ubuntu terminal shortcut [instead of opening a terminal use Alt+F2 to run the console]
    Ctrl + Q: Close an application window
    Alt + Tab: Switch between running applications
    Super[Win] + Space: Change input keyboard e.g. En <->Ru
    Ctrl + Alt + arrow: Move between workspaces
    Ctrl + Alt + Del: Log out
    Go to Settings->Devices->Keyboard [for Custom Keyboard Shortcuts]
  7. OTHER SPECIAL THINGS OF INTEREST SEE BELOW

========
Other Special Things you will do, if you want it, by REFERENCES ONLINE:  
========
1-DUAL BOOT WINDOWS-LINUX   
https://www.freecodecamp.org/news/how-to-dual-boot-any-linux-distribution-with-windows/
2-UBUNTU AS VIRTUAL MACHINE IN VMWARE HYPERVISOR  
https://www.linuxvmimages.com/images/ubuntustudio-2204/
https://linuxconfig.org/install-vmware-tools-on-ubuntu-22-04-jammy-jellyfish-linux
3-HOW TO INSTALL STEAM ON UBUNTU 22.04 FOR GAMING ON LINUX   
https://linuxconfig.org/how-to-install-steam-on-ubuntu-16-04-xenial-xerus
4-DO NOT DISTURB MODE UBUNTU    
https://ur9r.com/how-to-use-do-not-disturb-mode-in-ubuntu-so-you-can-focus-on-your-work/  
5-INSTALLING DESKTOP ENVIRONMENTS  
https://linuxconfig.org/how-to-install-ubuntu-studio-desktop-environment-on-ubuntu-20-04
https://linuxconfig.org/ubuntu-20-04-cinnamon-desktop-installation
6-1-KEYBOARD SHORTCUTS   
https://help.ubuntu.com/stable/ubuntu-help/shell-keyboard-shortcuts.html.en
6-2-SET KEYBOARD SHORTCUTS   
https://help.ubuntu.com/stable/ubuntu-help/keyboard-shortcuts-set.html.en
6-3-SCREENCAST & SCREENSHOTS KEYBOARD SHORTCUTS   
https://help.ubuntu.com/stable/ubuntu-help/screen-shot-record.html

============

I major/critical advice from the Source of
========
Ubuntu & Ubuntu Studio – Linux: www.ubuntustudio.org for current-old users of Ubuntu Studio 20.04, about the upgrade to all new Ubuntu Studio 22.04 LTS, NOT TO DO SO… BUT DO INSTEAD A CLEAN INSTALL OF 22.04!!!
https://ubuntustudio.org/2022/04/ubuntu-studio-22-04-lts-released/ >>>>

Upgrading

Since it’s just out, you may experience some issues, so you might want to wait a bit before upgrading.

Due to the change in the desktop environment that started after the release of 20.04 LTS, direct upgrades from 20.04 LTS are not supported and may only be attempted at-your-own-risk. As with any system-critical operation, back-up your data before attempting any upgrade. The safest upgrade path is a backup of your /home directory and a clean install.

We have had anecdotal reports of successful upgrades from 20.04 LTS (Xfce desktop) to later releases (Plasma desktop), but this will remain at your own risk, and it is highly recommended to wait until 22.04.1 is released in August before attempting such an upgrade.

Instructions for upgrading are included in the release notes.

========

Personally, I did a clean install of Ubuntu Studio 22.04 in VMware Workstation Pro 15 – and would recommend it because this allows you to clean up and start fresh with Ubuntu Studio 22.04 LTS with a new set of applications and a new desktop environment.

LSE

Part 2: How to install macOS Big Sur 11.4 using VirtualBox on Windows

Note:

You might replace your “Big Sur” with your own virtual Machine

This code is for:

https://youtu.be/tJgNCyhqdBo

DOWNLOAD Here Code

Code for VirtualBox 6.x Intel CPU

cd "C:\Program Files\Oracle\VirtualBox\" VBoxManage.exe modifyvm "Big Sur" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac19,1" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-AA95B1DDAB278B95" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

Code for Virtualbox 6.x AMD CPU

cd "C:\Program Files\Oracle\VirtualBox\" VBoxManage.exe modifyvm "Big Sur" --cpu-profile "Intel Core i7-6700K" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac19,1" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-AA95B1DDAB278B95" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VBoxManage setextradata "Big Sur" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1