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 / Check Memory Usage in Linux.md
Last active August 7, 2022 10:24
Check Memory Usage in Linux

free Command

free -h

Here’s what each column mean:

  • total - The total amount of memory that can be used by the applications.
  • used - Used memory. It is calculated as: used = total - free - buffers - cache
  • free - Free / Unused memory.
  • shared - This column can be ignored; it is shown only for backward compatibility.
@codedeep79
codedeep79 / Speed up the Ubuntu boot process.md
Last active August 7, 2022 10:30
Speed up the Ubuntu boot process

The first thing to do on a newer distro like yours is to use the following tool: systemd-analyze blame This will show you all the systemd services that have been started during the boot process and how long it took for each of them to start. If you can see any service that took too long to start, but either you or the system doesn't need it to start automatically during boot - you can disable it:

systemctl disable service-name.service

An important note here is that you need to make sure that the service really isn't need during boot, otherwise you could even break your system. To be sure - google the service first.

@codedeep79
codedeep79 / Cài đặt Docker Compose trên Ubuntu.md
Created August 7, 2022 09:20
Cài đặt Docker Compose trên Ubuntu

Prerequisites

We’re assuming that you have Docker installed on your Ubuntu machine.

Installing Docker Compose on Ubuntu

Use curl to download the Compose file into the /usr/local/bin directory:

sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Once the download is complete, apply executable permissions to the file:

sudo chmod +x /usr/local/bin/docker-compose
@codedeep79
codedeep79 / Cài đặt PyCharm Community trên Ubuntu.md
Created August 7, 2022 09:06
Cài đặt PyCharm Community trên Ubuntu

To download and install the PyCharm snap package, open your terminal by using the Ctrl + Alt + T keyboard shortcut and type:

sudo snap install pycharm-community --classic

The download may take some time depending on your connection speed. On successful installation of PyCharm, the following output will be displayed:

pycharm-community 2018.2.4 from 'jetbrains' installed
@codedeep79
codedeep79 / Cài đặt và sử dụng FFmpeg trên Ubuntu.md
Created August 7, 2022 09:04
Cài đặt và sử dụng FFmpeg trên Ubuntu

To install it, enter the following command as root or user with sudo privileges:

sudo apt update
sudo apt install ffmpeg

To verify the installation, use the ffmpeg -version command, which prints the FFmpeg version:

ffmpeg -version
@codedeep79
codedeep79 / Cài đặt Tor Browser trên Ubuntu.md
Created August 7, 2022 08:57
Cài đặt Tor Browser trên Ubuntu

Add the Tor browser launcher PPA repository:

sudo add-apt-repository ppa:micahflee/ppa

Install the Tor browser launcher package:

sudo apt update 
sudo apt install torbrowser-launcher
@codedeep79
codedeep79 / Cài đặt Sublime Text 3 trên Ubuntu.md
Last active August 7, 2022 08:55
Cài đặt Sublime Text 3 trên Ubuntu

Install the dependencies necessary to add a new repository over HTTPS:

sudo apt update
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common

Import the repository’s GPG key and the Sublime APT repository to your system’s software repository list by typing:

curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo add-apt-repository "deb https://download.sublimetext.com/ apt/stable/"
@codedeep79
codedeep79 / Cài đặt MariaDB trên Ubuntu.md
Created August 7, 2022 08:52
Cài đặt MariaDB trên Ubuntu

To install it run the following commands:

sudo apt update
sudo apt install mariadb-server

Once the installation is completed, the MariaDB service will start automatically. To verify that the database server is running, type:

sudo systemctl status mariadb

The output should show that the service is enabled and running:

@codedeep79
codedeep79 / Cài đặt Slack trên Ubuntu 22.04.md
Created August 6, 2022 11:04
Cài đặt Slack trên Ubuntu 22.04

Step 1: Update system repositories

sudo apt update
sudo apt upgrade

Step 2: Install Slack on Ubuntu 22.04

sudo apt install -y slack
@codedeep79
codedeep79 / Cài đặt Zoom trên Ubuntu.md
Created August 6, 2022 10:58
Cài đặt Zoom trên Ubuntu

Open your terminal and enter the following wget command to download the latest Zoom deb package:

wget https://zoom.us/client/latest/zoom_amd64.deb

Once the download is complete, install Zoom by running the following command as a user with sudo privileges:

sudo apt install ./zoom_amd64.deb