- RAM:4GB
- HD : 30GB
- Bootable OS
cat /etc/*release
sudo apt --fix-broken install
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Edit /etc/fstab and add the new swapfile if it isn’t already there
/swapfile none swap sw 0 0
Check the amount of swap available:
sudo swapon --show
sudo free -h
grep SwapTotal /proc/meminfo
sudo swapon --show
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1G count=16
sudo fallocate -l 3G /swapfile
sudo dd if=/dev/zero of=/swapfile bs=3082 count=3048576
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo nano /etc/fstab
sudo swapon --show
sudo free -h
cat /proc/sys/vm/swappiness
sudo sysctl vm.swappiness=10
free -m
sudo service elasticsearch start
curl -X GET 'http://localhost:9200'
free -m
In the following example, we’ll extend the swap space available in the /swapfile from 4 GB to 8 GB.
Turn off all swap processes
sudo swapoff -a
-
Resize the swap
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
if = input file of = output file bs = block size count = multiplier of blocks
-
Change permission
sudo chmod 600 /swapfile
-
Make the file usable as swap
sudo mkswap /swapfile
-
Activate the swap file
1 sudo swapon /swapfile 6. Edit /etc/fstab and add the new swapfile if it isn’t already there
/swapfile none swap sw 0 0
-
Check the amount of swap available
grep SwapTotal /proc/meminfo
cat /etc/apt/sources.list
uname -r
uname -mrs
#Linux 4.4.0-64 generic
sudo add-apt-repository ppa:cappelikan/ppa -y
sudo apt install mainline -y
sudo apt update && sudo apt upgrade -y
sudo apt-get dist-upgrade -y
update-manager –d
sudo reboot
nano ~/.bashrc
source ~/.bashrc
alias html="cd /var/www/html"
alias shopify="cd /var/www/html/shopify"
alias cl="clear"
alias u2="sudo apt update -y"
alias u3="sudo apt update && sudo apt upgrade -y"
alias uf="sudo apt --fix-broken install -y"
alias ur="sudo apt autoremove -y"
alias upg="apt list --upgradable -y"
alias hs="history"
alias cu="composer update"
alias cui="composer update --ignore-platform-reqs"
#Git
alias gb="git branch"
#PHP
alias pv=" php -v"
alias pvs="sudo update-alternatives --config php"
alias p81="sudo systemctl daemon-reload && sudo service php8.1-fpm restart"
alias p82="sudo systemctl daemon-reload && sudo service php8.2-fpm restart"
alias p83="sudo systemctl daemon-reload && sudo service php8.3-fpm restart"
alias p84="sudo systemctl daemon-reload && sudo service php8.3-fpm restart"
#nginx
alias nr="sudo service nginx restart"
alias nt="sudo nginx -t"
#magento
alias mrm="rm -rf var/cache/* var/tmp/_cache var/composer_home/cache/* var/view_preprocessed/* var/page_cache/* var/report/* var/log/* generated/code/* pub/static/* "
alias msu="php bin/magento s:up && bin/magento s:d:c && bin/magento s:s:d -f && bin/magento c:f && bin/magento i:rei"
alias mdc="php bin/magento s:d:c && bin/magento s:s:d -f && bin/magento c:f && bin/magento i:rei"
alias mcd="php bin/magento s:s:d -f && bin/magento c:f && bin/magento i:rei"
alias mcf="php bin/magento c:c && php bin/magento c:f"
alias mc="php bin/magento c:c"
alias mf="php php bin/magento c:f"
grep -R "what" "where"
grep -R "78048 Villingen-Schwenningen" .
grep -R "minicart.js" .
grep -R "apple-black-logo-bFu.svg" .
grep -R "catalog_product_index_eav_temp.PRIMARY" .