DEV Community

Shubham Singh
Shubham Singh

Posted on • Updated on

Terminal Setup Guide For Developers

The terminal is the most important tool for all developers, it enables a developer to increase productivity.
In this article, I will show you a way to get a beautiful terminal, with a perfect shell prompt in your windows system.

Image description

Image description

Step 1

Get the terminal of your choice I like to use windows terminal because it is officially supposed by Microsoft as well as it is opensource what else you can ask for nowadays.

There are some good alternatives like alacrity (cross-platform), cmder(window’s), Hyper(cross-platform), iTerm2(MacOS)
If you don’t want tabs, go for alacritty it’s the user you GPU for computational acceleration.

You also have some alternative of alacritty with uses GPU acceleration known as kitty also support image in the terminal by default which is quite a tedious task to get configured in other terminals.


In short, is prefer to use windows terminal in windows and of Linux base system I use alacritty and for macOS I recommend you to use itTerm2.
In this article, I am setting up a windows terminal as I like you can you any terminal of your choice.

You can use sites like windowsterminalthemes to get a theme of your choice and in windows terminal, you can set different themes for your different shell’s.
To install them in the windows terminal click on the drop-down arrow and click on setting.

Image description

and then in the setting menu click on the Open JSON file with this ⛮ icon it should open a file “setting.json”, here I’m using visual studio code.

Pro tip:

Use it if you are not.

Now go down to the property name of “schemes” and add the theme in there from windowsterminalthemes. dev (if you press the Get theme button it should be copied to your clipboard).

Image description

And just select theme from the setting menu

Image description

Pro Tip Serious One:

Get a package manager to install software and modules from the command line my recommendation for windows is chocolaty.

Install nerd font from here to get icons in terminal like this:

Image description


Now let’s get to the shell prompt, now you ask what is a shell prompt?
Shell prompt is the line shown every time after execution of the task, by default it doesn’t show more than the current working directory so let’s customize that.

Here I’m using PowerShell but it works will all the major shell’s
To install starship in your system run PowerShell as an administrator and run this command:

choco install starship

Also, get the nerd font if you haven’t by executing this command:

choco install firanf

if you haven’t installed chocolaty install it using this guide.
After successful installation of both starship and firanf run this command in PowerShell

notepad $PROFILE

it should open a notepad window at the end add this line and save the file

Invoke-Expression (&starship init powershell)

Now if you open your PowerShell it should show a green arrow for your prompt, if that’s not what you wanted you can customize your shell promote however you want but if you want my config just add a file “starship.toml” in your C:\Users{your user}.config folder with this inside.

# Don't print a new line at the start of the prompt
add_newline = false

# Make prompt a single line instead of two lines
disabled = false

# Replace the "❯" symbol in the prompt with "➜"
success_symbol = "[λ](bold red)" #[➜](bold green)

style_user = "green bold"
style_root = "green bold"
format = "[$user](bold green)@$hostname"
disabled = false
show_always = true

format = "via 🦀[$version](red bold)"

symbol = "☁️ "

symbol = " "

symbol = " "

read_only = "🔐 "

format = "via [🐋 $context](blue bold)"

symbol = " "

symbol = " "

format = " [$symbol$branch]($style) "
style = "bold yellow"
symbol = " "

symbol = " "

symbol = " "

symbol = " "

symbol = " "

symbol = " "

symbol = " "

symbol = " "

symbol = " "

symbol = "📦 "

symbol = " "

symbol = " "

symbol = " "

symbol = "ﯣ "

commit_hash_length = 8
style = "bold white"

conflicted = "⚔️ "
ahead = "🏎️ 💨×${count}"
behind = "🐢×${count}"
diverged = "🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count}"
untracked = "🛤️ ×${count}"
stashed = "📦 "
modified = "📝×${count}"
staged = "🗃️ ×${count}"
renamed = "📛×${count}"
deleted = "🗑️ ×${count}"
style = "bright-white"
format = "$all_status $ahead_behind"

ssh_only = false
format = "[$hostname]($style) "
trim_at = "-"
style = "bold dimmed white"
disabled = false

time_format = "%T"
format = "🕙 $time($style) "
style = "bright-white"
disabled = true

# [battery]
# full_symbol = "🔋"
# charging_symbol = "🔌"
# discharging_symbol = "⚡"
# disabled = false

# [[battery.display]]
# threshold = 30
# style = "bold red"
Enter fullscreen mode Exit fullscreen mode

Now you have a shell you wanted 😉

Please Like and Share.

forgive for typos CU's I'm NOOB

Top comments (0)