Things I changed in Ubuntu for productivity and improvements
Tags: linux, webdev, productivity, ubuntu
Published: 2022-06-19 07:56:55

## 1. Changing Left Alt / Left Ctrl
I extensively used Windows / Ubuntu / MacOS. One thing I found out very useful was the command key and I have small fingers I can't extend that much. So I just swtiched the Left Ctrl / Left Alt which I think is the most optimal for developers.

To swap the Left Ctrl / Left Alt 
```bash
sudo apt-get install gnome-tweak-tool 
```

Then open the **Tweaks** 
Keyboard & mouse -> Additional Layout Options -> Ctrl Position where we will find the option to swap
![Swap LCtrl and LAlt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6zlakk25v65se8y44j5.png)

## 2. Using Terminator instead of Gnome Terminal
 I love the terminal in ubuntu but customizing them takes some time. I simply need the split window option to see several terminals at the same time. Terminator just does that insanely good

To install Terminator
```bash
sudo apt install terminator
```

and on a single right click on the terminator lets you split windows like this.
![Terminator split window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpj2fmc6gbcdy0nvclay.png)
 
## 3. Adding git branch name on terminals
Having the role of web development I always use terminals for generally using git. Having to know which branch we're working on the terminal is the cool addition. You can see the red color text saying Master in the image.

![Git branch name on terminals](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3gnbdgyt3y2wzs0x8ml.png)

How to add git branch names on terminal

Add these lines in your ~/.bashrc file. More information on this [Forum](https://askubuntu.com/questions/730754/how-do-i-show-the-git-branch-with-colours-in-bash-prompt)

```bash
# Show git branch name
force_color_prompt=yes
color_prompt=yes
parse_git_branch() {
 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
fi
unset color_prompt force_color_prompt
```

Or In a simple way just add **oh my zsh** for your terminal
For that you have  to install zsh then oh my zsh!

```bash
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

```

Just say yes to use zsh as our default terminal and you are good to go! More details on [Oh my Zsh](https://ohmyz.sh/#install)

Thanks to @jankapunkt for letting me know about zsh in ubuntu!

## 4. Having a Swap space to avoid app crashes
Even though my laptop ram is 8 GB its not enough when I am running like 3 servers locally and had to utilize the internal SSD to behave similar to ram. Thats called a swap , if you haven't set up swap when installing the OS , you can set up now through terminal.

I am having a Swap space of 12 GB .. make sure you use around atleast 3 GB.
To add a swap space follow [this article](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04)  and make sure you add atleast 3 GB

Just have to change the unit 1G to 3G or 6G or 12G

## 5. Scroll through various gnome extensions.
I have [clipboard history](https://extensions.gnome.org/extension/779/clipboard-indicator/) Which shows me previously copied texts. 

You can just spend some 5 mins and install the things you need that can be pretty useful.

---

If you like this of content follow me @shrihari which will motivate to write more - _Peace_ 🕊 

---
## Try Our new product for free!
[DocsAI](https://docsai.app/) - Create AI support agents with your documents in the most affordable price, starts at **0$**. Don't need a bot , but need ai help on your docs just upload and start chating !

Using for a company ? [Check out our pricing](https://docsai.app/pricing) Just contact me for personalized pricing !

![docsAi](https://firebasestorage.googleapis.com/v0/b/shrihari-personal-storage.appspot.com/o/banner-docs-jpeg.jpeg?alt=media&token=45c47666-de2a-4e02-8881-beb6e43ce581)

---

## More Free articles from me 
{% embed https://dev.to/shrihari/text-formatting-on-html-using-js-functions-vs-angular-pipe-1f8g %}

{% embed https://dev.to/shrihari/colors-design-inspiration-websites-for-new-comers-1lcb %}

{% embed https://dev.to/shrihari/handle-asynchronous-errors-on-expressjs-without-trycatch--1e5b %}