How to install Micro Text Editor on Ubuntu 22.04

To Install Micro Text Editor On Ubuntu 22.04

Introduction:

Micro is a versatile terminal-based text editor that offers a balance between simplicity and functionality. It provides a user-friendly interface with convenient features such as standard keyboard shortcuts commonly found in desktop text editors.

Procedure :

Step 1: Check the OS version by using the below command

 root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy

Step 2: Download the Micro Text Editor tar file using wget command.

root@linuxhelp:~# wget https://github.com/zyedidia/micro/releases/download/v2.0.13/micro-2.0.13-linux64.tar.gz
--2024-07-08 07:30:00--  https://github.com/zyedidia/micro/releases/download/v2.0.13/micro-2.0.13-linux64.tar.gz
Resolving github.com (github.com)... 20.207.73.82
Connecting to github.com (github.com)|20.207.73.82|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/53632140/9e828b97-5c43-477c-91cc-d52ae8fea682?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240708%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240708T020000Z&X-Amz-Expires=300&X-Amz-Signature=a5ebb10a5bd93c841af9e1205dc55f964cce8dc29e793bddeda88517796dae15&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=53632140&response-content-disposition=attachment%3B%20filename%3Dmicro-2.0.13-linux64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2024-07-08 07:30:00--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/53632140/9e828b97-5c43-477c-91cc-d52ae8fea682?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240708%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240708T020000Z&X-Amz-Expires=300&X-Amz-Signature=a5ebb10a5bd93c841af9e1205dc55f964cce8dc29e793bddeda88517796dae15&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=53632140&response-content-disposition=attachment%3B%20filename%3Dmicro-2.0.13-linux64.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4817531 (4.6M) [application/octet-stream]
Saving to: ‘micro-2.0.13-linux64.tar.gz’
micro-2.0.13-linux64.tar.gz       100%[===========================================================>]   4.59M  --.-KB/s    in 0.1s    
2024-07-08 07:30:02 (37.0 MB/s) - ‘micro-2.0.13-linux64.tar.gz’ saved [4817531/4817531]

Step 3: List the directory by using the below command

root@linuxhelp:~# ls -a
.  ..  .bash_history  .bashrc  .cache  .lesshst  micro-2.0.13-linux64.tar.gz  .profile  snap  .viminfo  .wget-hsts  .Xauthority

Step 4: Extract the tar file by using the below command

root@linuxhelp:~# tar -xvf micro-2.0.13-linux64.tar.gz 
micro-2.0.13/
micro-2.0.13/micro.1
micro-2.0.13/LICENSE-THIRD-PARTY
micro-2.0.13/micro.desktop
micro-2.0.13/micro.svg
micro-2.0.13/LICENSE
micro-2.0.13/micro
micro-2.0.13/README.md

Step 5: File has been extracted. Now list the directory by using the below command

root@linuxhelp:~# ls -al
total 4756
drwx------  5 root    root       4096 Jul  8 07:30 .
drwxr-xr-x 20 root    root       4096 Sep 11  2023 ..
-rw-------  1 root    root        540 Mar  1 09:03 .bash_history
-rw-r--r--  1 root    root       3106 Oct 15  2021 .bashrc
drwx------  2 root    root       4096 Sep 11  2023 .cache
-rw-------  1 root    root         20 Sep 11  2023 .lesshst
drwxrwxr-x  2 globalt globalt    4096 Oct 22  2023 micro-2.0.13
-rw-r--r--  1 root    root    4817531 Oct 22  2023 micro-2.0.13-linux64.tar.gz
-rw-r--r--  1 root    root        161 Jul  9  2019 .profile
drwx------  5 root    root       4096 Sep 11  2023 snap
-rw-------  1 root    root       1312 Feb 18 01:15 .viminfo
-rw-r--r--  1 root    root        165 Jul  8 07:30 .wget-hsts
-rw-------  1 root    root         55 Sep 11  2023 .Xauthority

Step 6: Change the directory to micro-2.0.13 by using the below command

root@linuxhelp:~# cd micro-2.0.13

Step 7: Now list the directory by using the below command. You can find micro

root@linuxhelp:~/micro-2.0.13# ls -la

total 11744
drwxrwxr-x 2 globalt globalt     4096 Oct 22  2023 .
drwx------ 5 root    root        4096 Jul  8 07:30 ..
-rw-rw-r-- 1 globalt globalt     1086 Oct 22  2023 LICENSE
-rw-rw-r-- 1 globalt globalt    64161 Oct 22  2023 LICENSE-THIRD-PARTY
-rwxrwxr-x 1 globalt globalt 11915264 Oct 22  2023 micro
-rw-rw-r-- 1 globalt globalt     3055 Oct 22  2023 micro.1
-rw-rw-r-- 1 globalt globalt      552 Oct 22  2023 micro.desktop
-rw-rw-r-- 1 globalt globalt     6339 Oct 22  2023 micro.svg
-rw-rw-r-- 1 globalt globalt    13365 Oct 22  2023 README.md

Step 8: Run the micro by using the below command

root@linuxhelp:~/micro-2.0.13# ./micro 

Step 9: Type something in the file and press ctrl + s to save the file

Step 10: After the file has been saved. Press ctrl + q to exit the file

Step 11: Again list directory to check that the file has been created.

root@linuxhelp:~/micro-2.0.13# ls -la
total 11748
drwxrwxr-x 2 globalt globalt     4096 Jul  8 07:31 .
drwx------ 6 root    root        4096 Jul  8 07:31 ..
-rw-rw-r-- 1 globalt globalt     1086 Oct 22  2023 LICENSE
-rw-rw-r-- 1 globalt globalt    64161 Oct 22  2023 LICENSE-THIRD-PARTY
-rwxrwxr-x 1 globalt globalt 11915264 Oct 22  2023 micro
-rw-rw-r-- 1 globalt globalt     3055 Oct 22  2023 micro.1
-rw-rw-r-- 1 globalt globalt      552 Oct 22  2023 micro.desktop
-rw-rw-r-- 1 globalt globalt     6339 Oct 22  2023 micro.svg
-rw-rw-r-- 1 globalt globalt    13365 Oct 22  2023 README.md
-rw-r--r-- 1 root    root          10 Jul  8 07:31 test

Step 12: Cat the file for verification by using the below command

root@linuxhelp:~/micro-2.0.13# cat test
Linuxhelp

Step 13: Add the micro path to the system variable by using the below command

root@linuxhelp:~/micro-2.0.13# PATH=$PATH:/root/micro-2.0.13

Step 14: Run the following command to save the changes

root@linuxhelp:~/micro-2.0.13# source ~/.bashrc

Step 15: Now you can run micro from any location.

root@linuxhelp:~/micro-2.0.13# cd
root@linuxhelp:~# micro

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to installation of Micro Text Editor on Ubuntu 22.04. Your feedback is much welcome.

FAQ
Q
What is the key shortcut for help in Micro Text Editor?
A
Press ctrl + g key shortcut for help in Micro Text Editor
Q
How can I download the Micro Text Editor package?
A
Execute the following link:
# wget https://github.com/zyedidia/micro/releases/download/v1.4.0/micro-1.4.0-linux64.tar.gz
Q
How to exit from Micro Text Editor?
A
Press ctrl + q to exit from Micro Text Editor
Q
How to save the file in Micro Text Editor?
A
Press ctrl + s to save the file in Micro Text Editor
Q
What is Micro Text Editor?
A
Micro is a fantastic little terminal-based text editor that sits between nano and vim in terms of complexity.