Questions tagged [prompt]

The prompt is a series of characters used by any terminal interface to indicate that the terminal is ready to receive another command. Questions using this tag should be restricted to questions about the prompt, how to customize it, etc.

Filter by
Sorted by
Tagged with
2
votes
1answer
47 views

Following a recent upgrade to Ubuntu 20.04 installation terminal prompt is only displaying 4 characters

Have attempted fix using fonts in tweaks but that also only displays 4 characters for any font name and does not fix problem. Have tried installing alternative desktop and running several different ...
0
votes
0answers
40 views

Command not found with no command name

Since I installed powerline-go on my fresh install of Ubuntu 20.04, it throws -bash: : command not found error every time the prompt loads (after running a command, pressing enter, on startup, etc.). ...
0
votes
0answers
63 views

Customize wsl2 ubuntu terminal prompt

How do I change the ubuntu terminal prompt in of wsl2. My git-bash prompt looks like this : where /Algorithms is the base cwd. How do I make ubuntu prompt the same, with the same colors? TIA
0
votes
2answers
153 views

Is tilde '~' normal before dollar '$' sign in terminal prompt? [duplicate]

Is '~' normal before the $ sign, like, robert@robert:~$? I do not remember seeing it before.
0
votes
0answers
26 views

Customizing Prompt Ubuntu 20.04 - Help

I have been working on a customized prompt for my Ubuntu servers and I have gotten to a point where I need some help to figure out what I am missing. The prompt looks great, and works great, until I ...
0
votes
0answers
151 views

How to hide LUKS password prompt on boot? Or how to hide “please unlock disk sdX_crypt” in text mode?

I have read all the internet - not found. How to hide password prompt for boot LUKS encrypted (during installation) Ubuntu 20.04 LTS? I have a multi-level security setup, and one part of that is just ...
0
votes
1answer
131 views

select and the PS3 variable

I have a small function that I keep in my profile to give me quick access to some config files: viconf () { COLUMNS=12; printf "Edit config file:\n\n"; select x in ~/.bashrc ~/....
1
vote
1answer
52 views

Prompt string PS4 duplicating itself when using set -x

My OS: Ubuntu 18.04.5 LTS I use tracing for troubleshooting a script. I've notice different behaviors in the tracing depending on how I set it up. I would like to understand why it behaves this way. I ...
0
votes
0answers
20 views

grub2 prompt: “grub>” is changed to “>”

So I am at login screen of GNU GRUB 2.02 launched from USB stick. Its prompt is "grub>". When I type "ls" I see all my disks: hd0, hd1, hd2; hd0 is my USB stick, hd2 is my main ...
0
votes
1answer
87 views

how to create an alias which changes the bash prompt?

How can I make an alias along the lines of: command-line bash bashrc prompt ps1 alias=PS1="\d \h $ " which, obviously, won't work. Is there some trick to making assignments from the ....
0
votes
0answers
1k views

Software Updater not prompting to upgrade from 18.04 to 20.04 [duplicate]

My understanding was that when 20.04-1 came along that I would see a prompt on my multiple 18.04 machines that would offer to allow me to do an upgrade. I do know how to force it from the command line ...
1
vote
1answer
100 views

Terminal starts fast, but takes time to get ready

I'm on Kubuntu 20.04 and it's been a while since I've noticed that even though the konsole terminal starts fast after I enter the shortcut, it takes some seconds for the command prompt itself to ...
1
vote
1answer
562 views

Git_prompt branch no longer working after upgrade

I made a ps1 prompt a few years ago. Took a while to config it, now after upgrading it no longer works. The .bashprompt script (which gets loaded into my .bashrc along with git-sh-prompt) it will ...
0
votes
2answers
483 views

Green terminal prompt vanished from Ubuntu 20.04

It's a bit silly but as you can see, the initial words (prompt) displayed in the terminal look very simple (as you know, it has like a green color), something I didn't see at first since I executed ...
0
votes
1answer
408 views

Prompt a user for filename and path, test if file exists, if it doesn't exist create a blank file with that name

So far I have this #!/bin/bash printf -x "What file are you looking for?: " read x if [ -x x.txt ] then echo "ok" else echo "nok" fi But I have no idea where to go next, I need to have the ...
6
votes
1answer
730 views

Adding a tab and newline to my terminal prompt

My terminal prompt is way too long. If I enter a long command, it gets wrapped to the next line which is hard to read. I thought I'd take a page from ParrotOS and just have the commands entered on ...
3
votes
0answers
49 views

Can I style the Alt+F2 prompt?

I'm using Ubuntu 19.10. My main issue with it is that the Alt+F2 prompt darkens the entire screen underneath it while open and I find the resulting blink overstimulating. I looked on Google to no ...
2
votes
1answer
2k views

Meaning of $ and # symbols for normal and root user in terminal [duplicate]

What do the symbols mean # and $. Why # for root? Where do these conventions come from?
1
vote
2answers
235 views

Xfce4-terminal, midnight commander, show prompt in title

Issue. In xfce4-terminal, how can I display actual prompt from terminal in title when midnight commander is running? Funny is, that when I connect for example via ssh to old Centos (Linux ocms7-app 2....
1
vote
0answers
63 views

Repeated unnecessary password prompts

My Ubuntu 18.04 desktop keeps throwing up keyring password prompts that are clearly unnecessary, since I can just cancel them and continue working without trouble. This happens immediately after I ...
0
votes
1answer
1k views

Automatically answering an interactive prompt with “yes”

Some daemons ask if they shall be restarted, when they've got an update. I get asked whether I want to restart them or not. It opens a purple colored window, where I am supposed to navigate to yesor ...
1
vote
2answers
2k views

How do I hide the hostname in my terminal

I'm using zsh with powerlevel9k theme and I would like to know how to remove hostname from my terminal. This is how my terminal looks right now: I would like to change it to only show kathi instead ...
13
votes
2answers
3k views

How can I fix the dull colors I am getting in Ubuntu 19.04 Terminal?

I've just recently switched to Ubuntu 19.04 and I am now getting dull colors in terminal but only outside of programs: In comparison you can see the vivid colors I am used to when I use ranger: I ...
0
votes
0answers
38 views

How can I prompt for device password before applying updates?

I have an encrypted boot partition on an USB drive. How can I prompt the user to insert the USB drive, and decrypt it before applying system updates? I can write the script to decrypt and mount the ...
1
vote
0answers
45 views

Does Bash for Windows create an own desktop?

I downloaded Bash (Ubuntu 18.04) for Windows 10 yesterday and created my account, downloaded a couple of files there. i closed the prompt, now when i open it, it starts from System32 folder i got back ...
17
votes
2answers
5k views

How can I use the arrow sign in my bash prompt?

How can I use these red and green arrow signs in the bash prompt? update 1 This is my .bashrc file if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\...
0
votes
0answers
115 views

Is there a way to change passphrase prompt for ssh?

I wanted to change the prompt for ssh login, Enter passphrase for key 'path/to/key': to something else. Is that possible? Sorry I'm not really sure on the right verbiage, but I don't mean the PS1 ...
1
vote
0answers
81 views

How do I get prompt colours and auto-complete on 18.04 for a new user created with useradd?

I use Tilix, which is imo one of the best VTE based terminal emulators for Linux. If I create an Ubuntu 16.04 image on DigitalOcean, connect to it via SSH and then configure a new user (as below), ...
1
vote
2answers
149 views

VIM, when I shell to prompt using :!bash I'd like the command prompt to reflect me being in a shell

I am in vim all day lately, practicing code. Often times when I want to do something from the prompt - I will use a key binding for :!bash and do what ever I need to do, then type exit to return to ...
3
votes
1answer
9k views

Why does “(base)” appear in front of my terminal prompt II?

I have conda with two environments working, I have installed "conda_nb" and since I did it, the word "(base)" appears always in my prompt, I discovered that I can remove for a session using conda ...
0
votes
0answers
30 views

Command needed by dialogue box generated after clicking on “Ubuntu” Tile on Windows 10 Startup Menu

I desperately need to know what response is being sought by a DOS-type dialogue box that appears every time I click on the “Ubuntu” tile on my “Windows 10 Startup Menu”. I had previously asked if ...
1
vote
1answer
109 views

Divide command prompt into multiple lines

When working on the terminal like: algorithms@assistant:~$ ls Desktop Downloads Music Public Templates Videos Documents gtd.org Pictures snap version-check.sh the command ls ...
1
vote
1answer
358 views

Cannot export PS1 over SSH

Trying to customize shell prompt on a Ubuntu 18 LTS server over SSH. On the server, the .profile sources .bashrc correctly, and .bashrc has force_color_prompt=yes uncommented. The prompt is not ...
4
votes
1answer
3k views

__git_ps1 not found but does exist

~/.bash_aliases where I set PS1, and is included in ~/.bashrc (the default settings) # color PS1 PS1="\[\033[01;90m\]\D{%H:%M} \[\033[01;33m\]Ubuntu\[\033[00m\] \[\033[01;34m\]\w\[\033[01;35m\]$(...
1
vote
1answer
571 views

After a system upgrade, when I `su -` I get bash-4.4 as a prompt instead of root@hostname

I just upgraded my system. After logging in as root using su - there is no root username in my prompt, it's just -bash-4.4# What should I do here? Thanks.
3
votes
1answer
3k views

What does a hash sign (#) at the end of the directory path in a Bash prompt mean? [duplicate]

I was in the middle of installing updates for Ubuntu when I came across an error, which allowed me to "Start a new shell to examine the situation". Doing so placed me at the top of my directory ...
0
votes
1answer
122 views

New user, broken bash prompt parsing?

I created a new user. When I su into the new user, I get the following bash prompt: \[\e]0;\u@\h: \w\a\]\u@\h:\w$ For what it's worth, I created this user with the following Ansible task: user: ...
3
votes
3answers
1k views

Why user@hostname color changes after sourcing a file?

I noticed whenever I source a file, the color of user@hostname changes: Why?
6
votes
3answers
6k views

script to show git branch in bash no longer works on ubuntu 18.04

In my 16.04 installation I put this in my ~/.bashrc file: #Show git branch in commandline parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1=...
0
votes
1answer
735 views

How to assign variable to PROMPT_COMMAND

How can I increment a variable assigning its value to PROMPT_COMMAND variable? Inside .bashrc I created variable a and assigned value to 0 and then added this a=0 PROMPT_COMMAND=`((a++))` When I ...
194
votes
7answers
280k views

Why does “(base)” appear in front of my terminal prompt?

I'm wondering why I have (base) on the left of my terminal prompt. If I run source ~/.profile in the terminal, it disappears. If I close that terminal and reopen a new terminal, (base) is there ...
-1
votes
1answer
650 views

No line break with colored git branch in bash prompt [duplicate]

I added a function to my .bashrc to parse the git branch I'm currently working in and display it in my bash-prompt according to several tutorials on this topic. My code snippet looks like this: ...
1
vote
1answer
1k views

Cannot get colored prompt despite setting PS1 in .bashrc

One of the machines I log into via ssh doesn't give me a colored prompt, despite setting it via .bashrc. The .bashrc part in question is # set a fancy prompt (non-color, unless we know we "want" ...
1
vote
1answer
75 views

Shim prompts “Verification succeeded” on every startup

I have Ubuntu 16.04.3, and installed nvidia-384.111. I enabled secure boot in the BIOS, and signed the driver via mokutils. On reboot, shim prompted to enroll the new MOK. So, nvidia drivers were ...
3
votes
1answer
231 views

Where is the timestamp in this script that sets the prompt?

I came across this old post, which I find useful. Now, I'm trying hard, but in vain, to tell which part of it is responsible for printing the timestamp at the end of the dashes. The following is the ...
4
votes
1answer
27k views

“export PS1=” for customizing shell prompt

I wanted to customize my shell prompt to include the time. So, I did export PS1='\t\w\$'. My prompt now looks like 18:57:37~$. I don't know how to prepend it with username@hostname. Also, I don't ...
0
votes
1answer
58 views

My ubuntu terminal is opening as “gdhobe@vfroot-Thinkpad-T440:~$” I want to open it as “vfroot-Thinkpad-T440:~$” [duplicate]

My ubuntu terminal is opening as "gdhobe@vfroot-Thinkpad-T440:~$" I want to open it as "vfroot-Thinkpad-T440:~$" Usually terminal opens as vfroot-Thinkpad-T440:~$ How this issue could be solved.
1
vote
1answer
144 views

prompt changes color when I become a permanent superuser

I made my prompt more visible in the bashrc file but when I try to become a permanent superuser with sudo su - I get that horrible old blue on black, which is nearly impossible to see. How can I make ...
1
vote
1answer
711 views

How do I change hostname? [duplicate]

The hostname of my name is very long, which is odd. How can change the hostname for my system? My hostname, currently, is himanshu@himanshu-Lenovo-ideapad-100-15IBD:~$ Is there any way I can ...
0
votes
1answer
141 views

\w is not abbreviating $HOME as ~

I'm SSHing into my schools linux servers, and My PS1 is currently set to: PS1="$USER@${HOSTNAME%%.*} (\w) % " and when I first connect my prompt correctly shows: myusername@servername (~) % but ...