Setting Up Manjaro Linux From Scratch!!

Written by skyline | Published 2019/08/09
Tech Story Tags: linux | manjaro-linux | kde-based-distros | productivity | programming | ubuntu | environment-setup | latest-tech-stories

TLDR Problem: Sometimes when you write your ISO in DD mode then your USB drive shows less space. Like if USB is 8gb then its shows only 4mb size of whole pen drive. Insert USB stick in Linux ( only Linux and MacOS can solve this Problem ) and delete all the partitions that are present in current USB stick, and assign new partitions (this will solve your problem) Now install the system via USB stick. Installing system will install Yaourt, a command line interface program which complete pacman for installing software on Arch Linux.via the TL;DR App

STEP 1 : Download an Image File 😉
Download an Image file from their official_website and install this image file through any booting software like Rufus.
NOTE : Select write in “DD” mode . (this option is particular for manjaro KDE version) and for other manjaro version choose “ISO image mode”
Recommended : Manjaro KDE (if your pc/laptop have i5).

Problem : Sometimes when you write your ISO in DD mode then your USB drive shows less space. like if USB is 8gb then its shows only 4mb size of whole pen drive.
To Solve this Problem : Insert USB stick in Linux ( only Linux and MacOS can solve this Problem ).
Open KDE Partition Manager ( In Manjaro ) and delete all the partitions that are present in current USB stick, and assign new partitions (this will solve your problem).
Now install the system via USB stick.
STEP 2 : Partitions
For Example : — If You have 250GB SSD like me
otherwise partition the drive according to your need.
Root (/) — Primary ( 50–60 GB)
Home (/home) — Primary (As per Need )(In my system (150 -160 GB)
Boot (/boot) — Primary ( 2–3 GB)
Extended (/Logical) — Remaining space( Total =250 Gb — 60Gb —150Gb — 3Gb = 37GB)
Var (/var) — 17GB(Because its stores all the temps and caches)
Swap(Linux Swap) — 20GB
( Mainly 2 X RAM ).
STEP 3 : Install Yaourt In Manjaro

Yaourt, stands for Yet AnOther User Repository Tool
Yaourt :-is a command line interface program which complete pacman for installing software on Archlinux.
Installation:-
1. Using Custom Repository 
sudo nano /etc/pacman.conf
add the following in the end of the file.
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
save and close the file.
Now Update Repo database and install Yaourt using command.
sudo pacman -Sy yaourt

2. Using AUR

sudo pacman -S --needed base-devel git wget yajl
after installing necessary dependencies we have to install package — query that allows to build and run yaourt.
git clone https://aur.archlinux.org/package-query.git

cd package-query/

makepkg -si

cd ..

git clone https://aur.archlinux.org/yaourt.git

cd yaourt/

makepkg -si

cd ..

sudo rm -dR yaourt/ package-query/
Run these commands line by line. ( i m not including explanation of every command in this Article. if you want to know more follow this )

This will install Yaourt in system .
Some Basics Usages of Yaourt -
1. Update Arch Linux
 yaourt -Syu
2. Install a Package
yaourt -S <package-name>
3. To Upgrade a packages
yaourt -U <package>
Enable Yaourt In Octopi

STEP 4: Applications

After Installing a system ,we will install some basic apps that we need.
Enable AUR : — Open Octopi then go to tools and enable AUR.
1. Browsers
  1. Mozilla Firefox — by default Installed .
  2. Google Chrome — Install Using AUR (package name — {{ google-chrome }} In AUR ).
  3. Vivaldi — Install Using Yaourt lib (Click on Skeleton Button in Octopi Then search {{ Vivaldi }}
2. Code Editors
  1. Atom — By AUR
  2. Web-storm — By Yaourt
  3. VS Code Studio — By Yaourt (Search — {{ Visual-studio-code-bin }}
3. For Download
  1. uget — By AUR
  2. Transmission(Torrent_Client) — AUR{{ Transmission-cli }}
4. For Email
  1. MailSpring — By Yaourt
5. Other Apps
  1. Telegram_desktop — By Aur
  2. franz — By Yaourt {{ Franz-bin }}
  3. MegaSync — By Yaourt {{ megasync }}
  4. Stacer (CleanUp Tool) — By Yaourt {{ stacer }}
  5. TimeShift (Backup Software)-By AUR
  6. Sweeper (System Cleaner) — By AUR
  7. Discover (Software Manager) — By AUR
Now we have all the basics apps we need.

STEP 5 : Get all the apps of KDE-Plasma

Follow this step only if you have high configurable PC otherwise it will slow down your system or install its small package.
Sudo pacman -S Plasma kio-extras
1. All Applications
Sudo pacman -S Kde-applications
2. Selected Applications
Sudo pacman -S Kdebase
3. Some other settings are default display manager for kde is SDDM(Update)
Sudo Systemctl enable sddm.service --force
reboot
4. Update Current User
/usr/bin/cp -rf/etc/skel/.
reboot

STEP 6 : System Configuration

  1. Desktop Theme — Breeze dark
  2. Look and Feel — Breeze dark
  3. Cursor — Breeze
  4. Splash Screen — Adapta
  5. Color — Breath dark
  6. Font — Noto sans 10
  7. Icons — Breeze or La Captaine
  8. Application Style — Breeze

Widgets

  1. Event Calendar
  2. Memory Status
  3. Network Monitor
  4. System Load Viewer
  5. CPU Load Monitor
  6. Resource Monitor
  7. Hard Disk Space Usage
  8. Hard Disk I/O Monitor

Some Important Settings :-

Goto System Settings and in Startup and Shutdown Section
  1. Click on — Desktop Session {{ Restore Manually Saved Session }}
  2. Click on — Default Leave Option {{ End Current Session }}
  3. Click on — Autostart{{ Disable all applications }}
Otherwise it will slow your pc and open any time new desktop.

STEP 7 : Mount 2nd Storage Drive(To Increase Storage)

This option is only for you when you have a 2nd storage drive in your system.
Like we have two storage drives in our system 1 SSD + 1 HDD
Then we install the system in SSD and use HDD as for media and other files of the system.

Partition , Formatting and Mounting :

Partition :-

Sudo fdisk-l
check the fs format of your hardisk is based on like
1TB MyHdd on /dev/sda but we can’t mount it right now , if we mount errors will come out.
we need to partition it first:
Sudo fdisk /dev/sda
Note — “ m “ for help(command list)
for checking partition table — “P”(Enter P)
To partition , enter “n”,then just choose primary by entering “p”.
and then enter “1” for only one partition number.

Formatting :-

Format the new partitioned HDD (remember fs format of your hdd)
Sudo mkfs.ext4 /dev/sda

Mounting :-

Usually drives are mounted in /mnt
Sudo mkdir /mnt/sda
Then we can mount it by 
Sudo mount /dev/sda /mnt/sda
Whenever we reboot it will automatically mounted.
we use nano /etc/fstab
Note — To save this login terminal as a Root.
/dev/sda  /mnt/sda  ext4  default  0  0
  • 1 - Path for hard drive
  • 2 - Destination for the mounted drive
  • 3 - format type
  • 4–6. Kept as default 0 and 0

STEP 8 : Create a Backup of system Via TimeShift

when you are done installing all the apps then set all the settings. Now its time to create a backup of the system .
This backup is useful if you accidentally delete any system file or any error occurred in the middle of something.
Note - After creating Backup we will save its files in 2nd Storage drive or external hdd (because i don’t have space in my ssd to permanently saved this backup.but, if you have space in your ssd then don’t follow steps after the step 2.
Step 1 : Open TimeShift
Step 2 : Create Snapshot
Step 3 : Now copy all the backup files in Extenal Hdd/2nd hdd.
Open Terminal As a Root
cp -a /timeShift/snapshots/{your snapshot name}/  /mnt/{Name of your 2nd storage drive}/backup
Note  —  Backup from this command because
without this system can’t give access to us to direct copy. and create
compressed version of your backup then you will be able to save in
external hdd.
for Restore — Open octopi and search timeShift and then install
and copy the whole snapshot to that folder Root/TimeShift/snapshots/ next, the option of restore will appear in Timeshift.

STEP 9 : Clean Tmp Regularly

Clean /Var/tmp folder regularly, if it is not cleared regularly ,system will crash(only when var folder have no space left).
1. Natural Method
Open File Manager and go to Root/var folder, clean the folder according to the need and delete by the option of “Root Actions”.
We will check from terminal that how much space is occupied in Var folder.
df -h
2. Automated Method
Run Sweeper and Stacer Regularly.

STEP 10 : Configure oh-my-Zsh Terminal

oh-my-Zsh is The best terminal I’ve ever used.
for Zsh we have to pre install these:
  1. git
  2. curl
  3. wget
By Curl
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
By Pacman
pacman -S Zsh
Some settings for Zsh :
Switching from - Zsh to bash and vice versa
exec bash (to bash)
exec zsh (to zsh)
Change default shell
chsh -s /bin/zsh
Manual Update
upgrade-oh-my-zsh
Uninstall Zsh
uninstall-oh-my-zsh
Lists of shells (Installed in your system)
cat /etc/shells
Plugins (In my System)

plugins=(git, archlinux, brew, npm, node, github, ssh-agent, sudo, vscode, zsh-syntax-highlighting, Zsh-autosuggestions )
Theme (In my System)
ZSH_THEME=agnoster
Path (Imp)
.Zshrc file in Home Directory
1. # Path to your oh-my-zsh installation.
export ZSH="/home/{{ Pc_UserName }}/.oh-my-zsh"
2. source $ZSH/oh-my-zsh.sh
3. # If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
Custom Plugins
1. Add Syntax highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
2. Auto Suggestion
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Run both the codes from your zsh_Terminal
Now, Activate— go to .Zshrc file in home directory .
Add:
plugins=( zsh-syntax-highlighting
          zsh-autosuggestions
        )
Fonts and color scheme settings
Right click on empty zsh_terminal and click on Edit current profile then click on Appearence.
Color-Scheme & background - Maia
font - Meslo LG S DZ for Powerline
Install- Powerline Fonts

Articles for Zsh

  1. agnoster/agnoster-zsh-theme
  2. powerline/fonts
    😎 Follow me on Instagram @hypnosisss___ & Twitter @akash_Rajvanshi
    Check out my other productivity tools posts:

Written by skyline | Developer || Writer || Engineer
Published by HackerNoon on 2019/08/09