How to upgrade your linux kernel, Debian/Ubuntu

Ubuntu

  1. Download the ubuntu-mainline-kernel.sh Bash script utility. Open up your terminal and enter:

wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh

  1. install the previously downloaded script into our executable path:

sudo install ubuntu-mainline-kernel.sh /usr/local/bin/

  1. All is ready to upgrade the Ubuntu kernel to the latest version. To do so run do following command:

ubuntu-mainline-kernel.sh -i

The above command will search for the latest kernel version available. To continue with the kernel installation answer y.

  1. Finally, reboot your system

reboot

Debian

  1. Update the system
    apt update && apt full-upgrade -y
    apt install lsb-release

  2. Add the repo to the sources list

1
2
3
4
5
6
7
8
cat > /etc/apt/sources.list << EOF
deb http://cdn-aws.deb.debian.org/debian $(lsb_release -sc) main contrib non-free
deb http://cdn-aws.deb.debian.org/debian-security $(lsb_release -sc)/updates main contrib non-free
deb http://cdn-aws.deb.debian.org/debian $(lsb_release -sc)-updates main contrib non-free
deb http://cdn-aws.deb.debian.org/debian $(lsb_release -sc)-backports main contrib non-free
deb http://cdn-aws.deb.debian.org/debian $(lsb_release -sc)-proposed-updates main contrib non-free
# deb http://cdn-aws.deb.debian.org/debian $(lsb_release -sc)-backports-sloppy main contrib non-free
EOF
  1. Do the update again
    apt update

  2. upgrade your kernel
    apt install -t $(lsb_release -sc)-backports linux-image-$(dpkg --print-architecture) linux-headers-$(dpkg --print-architecture) --install-recommends -y
    update-grub
    reboot

How to host a Hexo Blog on your Windows laptop with server

Since I recently learned about Nodejs, and I will probably focus on nodejs in the foreseeable future, I migrated my blog from Wordpress to Hexo.
Here is a little note about how to install a hexo blog.

Install VSCode

This part you need to do it yourself.

Install scoop

Scoop is a package manager on Windows. Highly suggested.

Type the following into PowerShell to ensure that local scripts are allowed to execute.

set-executionpolicy remotesigned -scope currentuser

Then install Scoop by executing the following command.

iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

Just wait for the script to finish, and once it’s installed successfully, let’s try the following

scoop help

Finally install nodejs with scoop.

scoop install nodejs

Install hexo and git

Use npm to install hexo on your laptop:

npm install -g hexo-cli

Open the folder you want to store your blog data, then create a blog by using the following command:

hexo init [folder] // [folder] = your blog’s path

Open the project folder with VSCode:

npm install

Finally,

hexo s

Open your browser and localhost:4000 to see your website

Create a github repo

Follow the command provided by github:

Push your blog to Github

Every git-push process need the following three commands:

1
2
3
git add .
git commit -m "Your comment"
git push

You can open terminal on VSCode by clicking Ctrl+`

Host on Netlify for free

Well, I am lazy… and Netlify already did the job

To be continues…