Skip to content

Instantly share code, notes, and snippets.

View codedeep79's full-sized avatar

Nguyễn Trung Hậu codedeep79

View GitHub Profile
@codedeep79
codedeep79 / debian is not in the sudoers file. This incident will be reported.md
Last active September 1, 2022 07:02
Error: debian is not in the sudoers file. This incident will be reported.

This article explains how to "fix" sudo not working on Linux, resulting in this message when trying to use it: "your-username is not in the sudoers file. This incident will be reported." on Debian (and Debian-based Linux distributions like Ubuntu). The solution 1 here is:

su -
usermod -aG sudo YOUR_USERNAME
exit

The solution 2 here is:

@codedeep79
codedeep79 / Why won't Synaptic Package Manager work with Wayland.md
Last active October 3, 2022 03:10
Why won't Synaptic Package Manager work with Wayland? I was trying to install Debian on an HP laptop with a Realtek Wireless Network Adapter but Synaptic Package Manager was giving me issues because of "Wayland".

I was trying to install Debian on an HP laptop with a Realtek Wireless Network Adapter but Synaptic Package Manager was giving me issues because of "Wayland".

We should be able to bypass this using:

xhost +si:localuser:root
sudo -H synaptic
@codedeep79
codedeep79 / Install Flutter on Debian.md
Last active May 6, 2026 10:37
Install Flutter on Debian

Run System update

Let’s first run the system update command before installing Flutter, this will update all the already installed packages on our Debian Linux. In addition to refreshing the system repo cache.

sudo apt update

Install Dependencies

There are few tools and libraries required to use Flutter on Linux such as Debian. Hence, before moving further use the below-given command to install them:

sudo apt install curl file git unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config libgtk-3-dev
@codedeep79
codedeep79 / Install Curl in Debian.md
Last active September 1, 2022 07:18
curl : Depends: libcurl4 (= 7.64.0-4+deb10u2) but 7.64.0-4+deb10u3 is to be installed E: Unable to correct problems, you have held broken packages.

Run the following command:

sudo apt remove libcurl4
sudo apt install curl

@codedeep79
codedeep79 / Finding Hardware using Linux.md
Created August 31, 2022 08:30
Finding Hardware using Linux

CPU Model

grep -i "model name" /proc/cpuinfo

GPU Model

lspci | grep -i --color "vga\|3d\|2d"

@codedeep79
codedeep79 / Access denied for user 'root'@'localhost'.md
Created August 24, 2022 08:59
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

When i try access MySQL: mysql -u root -p -h 127.0.0.1 -P 3306, then i get error:ERROR 1698 (28000): Access denied for user 'root'@'localhost'

Solution:

sudo mysql -u root # I had to use "sudo" since it was a new installation

mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
@codedeep79
codedeep79 / install mysql workbench on linux debian 10.md
Last active August 24, 2022 04:15
How to install mysql workbench on linux debian 10

I am trying to install MySQL Workbench on my Google Pixelbook. It runs Linux debian 10 buster.

So I run these commands:

sudo apt-get update
sudo apt-get install mysql-workbench

I get this error:

@codedeep79
codedeep79 / Install Mysql Workbench on Debian 11 Bullseye Linux.md
Created August 24, 2022 03:56
Install Mysql Workbench on Debian 11 Bullseye Linux

Add Debian SID repository

echo "deb http://deb.debian.org/debian sid main contrib non-free" | sudo tee /etc/apt/sources.list.d/sid.list

Run system update

sudo apt update

Install MySQL workbench on Debian 11

@codedeep79
codedeep79 / Installing LAMP on Debian 10 (Buster).md
Created August 24, 2022 03:53
Installing LAMP on Debian 10 (Buster)

Updating the Debian Linux, run:

sudo -- sh -c 'apt update && apt upgrade'

Install Apache, execute:

sudo apt install apache2

Update the Firewall and open port 80 and 443, run:

@codedeep79
codedeep79 / dpkg: error: dpkg status database is locked by another process.md
Created August 24, 2022 03:45
dpkg: error: dpkg status database is locked by another process (Debian, Ubuntu)

There are several lock files that might need to be removed:

sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock

Then you can fix dpkg as suggested:

sudo apt update