The terminal emulator is a tool that is used by system administrators and power users on Linux distributions. By utilizing a range of modules, the free and open source Starship plugin made in Rust allows us to personalize our own shell prompt. A text-based interface called the Linux terminal is used to manage Linux computers. It is merely one of the many tools accessible to Linux users for carrying out any given activity, but it is often regarded as the most effective approach.
- Open a Terminal window and type the following command to change the prompt of your Linux terminal: sudo set prompt=’%prompt%’
Steps to customize Linux Terminal Prompt Using Starship
Install Starship
sudo apt-get install starship Step 2: To use starship, you must first create a file called “startup.cfg” in your home directory.
starship startup.cfg
setenv SWITCH_HOST “localhost” setenv SWITCH_PORT “8181”
This command will download and install the starship binary and add it to your path.
Install Starship on Your Shell
alias ls=‘ls -F’ Step 2: If you are using a zsh shell, open your “~/.zshrc” file and paste this line of code at the end. alias ls=‘ls -F’ ..
If you are using Bash, open your “~/.bashrc” file instead and paste the above line of code at the end of it. ..
Step 4: Type “help” and press enter. The help prompt will appear. Step 5: On the help prompt, type “man” and press enter. The man prompt will appear. Step 6: On the man prompt, type “nm” and press enter. The nm prompt will appear. Step 7: Type “exit” and press enter. The terminal app will close and you’ll be returned to your default starship prompt.
Step 4: If you have a different shell than the two shells provided, find your preferred shell there and use it.
Customize Starship
Step 2: Add the following lines to your starship.toml file: [prompt] name=%(name)s command=%(command)s ..
export STARSHIP_CONFIG=/home/username/.starfleet/config
The contents of this file are used to configure the starship
and its related subsystems. It is a good idea to make this file
regularly updated, as changes to the configuration can
result in improved performance or new features.
Copyright (C) 2017 by Microsoft Corporation. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Prompt Customization in Starship
- We can change the prompt style to a more modern look.
- We can change the prompt style to a more traditional look.
- We can change the prompt style to a more classic look.
- We can change the prompt style to a more modern look and feel
The prompt is a text box that will show up in the terminal when you start typing. You can customize it to look however you want. ..
A starship must wait this many seconds before attempting to scan files again. ..
Command timeout occurred while executing a command on a starship.
If set to true, a blank line is inserted between the shell prompt and the output of commands. ..
Uninstall starship
Step 2: To uninstall starship, open a command prompt and type " uninstall starship" . Step 3: To uninstall starship, follow the prompts.
First, remove the line you pasted during installation: export PATH=$PATH:/usr/local/bin Next, add the following line to your “~/.bashrc” file: export PATH=$PATH:/usr/local/sbin:/usr/local/bin ..
Step 3: Remove the starship binary from your device.
Your prompt has been restored to the default style.
Final Words
If you’re looking for a quick and easy way to customize your Linux terminal prompt, Starship is the perfect choice. This cross-shell prompt is built in the rust language and can be customized to your liking. Simply change the config file to the proper position if you are switching to a different device or shell, and your stunning shell will be ready immediately.