Linux ~ Modify GNU Grub

Buat file backupnya terlebih dahulu agar aman jika terjadi error didepannya.

Membuat Backup File :

sudo cp /etc/default/grub /etc/default/grub.bak

Modifikasi file grub:

sudo nano /etc/default/grub

GRUB_DEFAULT=2
Tentukan default system yang mana.
Mulai dari 0 … 1 … 2 … 3 …. dst


Untuk Menghilangkan memtest gunakan -x
Jika ingin mengembalikan, gunakan +x

sudo chmod -x /etc/grub.d/20_memtest86+

Jika modifikasi beres, update untuk menjalankan perubahan:

sudo update-grub

Dapat juga mengedit file lain dari GRUB

sudo nano /boot/grub/grub.cfg

Untuk menghilangkan submenu ‘Advanced options for Ubuntu’ cukup dengan memberi tanda comment sebelum baris tersebut seperti :

#submenu 'Advanced options for Ubuntu'...................{
#..........................
#.........................
# }

Setelah modifikasi file grub.cfg tidak perlu update-grub karena jika dilakukan akan mengembalikan file tersebut seperti semula.

Kita juga dapat merubah nama pada GRUB dengan merubah pada:
menuentry 'Ubuntu'
menjadi
menuentry 'Linux Ubuntu'


Document License:
Copyright © ic4l.net
Strictly prohibited to copy or tracing of part or entirely from this posting. Because art is the intellectual property of its creator.

Linux ~ Make a Permanent Alias in Terminal

Edit file ~/.bashrc menggunakan text editor

nano ~/.bashrc

Cari line “#some more ls aliases” dan tambahkan di akhir baris alias yang baru. Misal :

alias iserve="php artisan serve --host iserver.local"
alias htdocs="cd /var/www/html/"

close and save …. tekan CTRL + X … laly Yes dan yes

jalankan perintah dibawah ini untuk mengaktifkannya

source ~/.bashrc

Sekian

Linux ~ phpmyadmin error on PHP 8

Back up phpMyAdmin

Backup dulu file yang lama.

 $ sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak

Create a new phpMyAdmin folder

$ sudo mkdir /usr/share/phpmyadmin/

Change to the directory

$ cd /usr/share/phpmyadmin/

Download and Extract phpMyAdmin

$ sudo wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz

Now extract

$ sudo tar xzf phpMyAdmin-*-all-languages.tar.gz

Once extracted, list folder

$ ls

Nanti akan kelihatan folder phpMyAdmin-*-all-languages

Kita akan memindah isi folder ke /usr/share/phpmyadmin

$ sudo mv phpMyAdmin-*-all-languages/* /usr/share/phpmyadmin

Make a copy of /usr/share/phpmyadmin/config.sample.inc.php

$ sudo cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php

Now edit the config.inc.php

$ sudo nano config.inc.php

$cfg['blowfish_secret'] = 'Zbwen/BEAFv:HTbqOROrqakJ;KUMIpV:'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

$ Ctrl+x /* to save the file */

Go to your site/phpmyadmin check all error is cleared.

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

YOU MAY ENCOUNTER THIS ERROR MESSAGE ON PHPMYADMIN /INDEX.PHP

IT MAY SAY SOMETHING LIKE:

The $cfg['TempDir'] (/usr/share/phpmyadmin/tmp) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

===SOLUTION==

$ sudo mkdir -p /var/tmp/phpMyAdmin

$ sudo chown www-data:www-data /var/tmp/phpMyAdmin

$ sudo chmod -R 700 /var/tmp/phpMyAdmin

Edit the config.inc.php again

$ sudo nano config.inc.php

add or replace this line

$cfg['TempDir'] = '/var/tmp/phpMyAdmin';

Cleanup — You can now delete the tar.gz file and the empty folder.

$ sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-latest-all-languages.tar.gz

And if you’re certain your new phpMyAdmin install is working correctly you can delete the backup folder.

$ sudo rm -rf /usr/share/phpmyadmin.bak

Linux ~ Aplikasi Wajib Linux

bpytop

$ sudo apt install python3-pip   [On Debian/Ubuntu]
$ sudo yum install python-pip    [On CentOS/RHEL]   
$ sudo dnf install python3       [On Fedora]
sudo pip3 install bpytop
$ bpytop

Neofetch

sudo apt install neofetch

The Matrix

What programmer doesn’t wish they coud read and write code like in the matrix?

Install it with

sudo apt-get install cmatrix

and run it with

cmatrix

Linux – Error Pada phpmyadmin

Jika kita install phpmyadmin pada ubuntu 18.* keatas kita akan menemukan error jika kita masuk ke sebuah tabel.

sudo sed -i "s/|\s*\((count(\$analyzed_sql_results\['select_expr'\]\)/| (\1)/g" /usr/share/phpmyadmin/libraries/sql.lib.php
sudo systemctl restart mysql
sudo service apache2 restart