A string of characters displayed by interactive shells to signal the shell is waiting a user input.

learn more… | top users | synonyms

0
votes
1answer
24 views

Update 'changing' variables every time PS1 is called, i.e. every new prompt [duplicate]

The reason I need to be able to do this, is to have 'updating' variables in my PS1. I'd like to have my prompt span across the entire width of the terminal, not wrapping around or going down to a new ...
1
vote
1answer
27 views

Can Bash tell an interactive SSH session from an in-line SSH session?

I have a Bash script that needs to be run from an interactive prompt, due to environment variables and configuration that only seems to be read when actually logged into a session. Examples below: ...
0
votes
0answers
51 views

Meaning of three dots in default terminal window in Debian

I have a debian machine, and each time when I login and open the terminal, the default window used to start up with [mgiri-deb7-64:~]1 % However, yesterday, I used putty to login into this ...
1
vote
4answers
101 views

Bash prompt execute command every time a new prompt is displayed

I have the following prompt in bash which shows the current git branch: PS1+="$(git_prompt)" #git_prompt is a function in my .bashrc which works when I source the .bashrc, but not when I change the ...
1
vote
1answer
53 views

Updating a git variable in the Shell prompt on every command

I am running TCSH and I would like to update my prompt every time I run a command. I think can currently do that via backticks. set tmpstr = `git status --untracked-files=no --porcelain` set ...
0
votes
1answer
77 views

How do I ask password by GUI prompt while using sudo in script?

I use Trisquel GNU/Linux with GNOME Flashback Desktop Environment. I need a GUI password prompt for user for executing command with sudo in script. Example consider following script: zenity ...
1
vote
1answer
46 views

How to make the prompt beep with every key press/character printed?

You know how hollywood movies depict hacking scenes with fast yet scrolling CLI technobabble in this fashion : https://www.youtube.com/watch?v=-jkj60TUWaE I want to know how to modify linux to make ...
1
vote
0answers
26 views

How can I make tcsh echo the time that a command is executed, before it is executed?

I would like tcsh to print the time that each command is executed, preferably in the right-hand column of the screen. This is similar to what rprompt can be used to do with the following setting, ...
0
votes
1answer
53 views

NixOS no login prompt in virtual terminals

I have NixOS built using 15.09 channel, session manager is sddm, display manager is KDE 5. Switching to virtual ttys from 1 to 6 gives me no login prompt, I see same piece of log everywhere: ...
1
vote
0answers
12 views

Can I set a text color for the prompt or text I type to to be different from text generated. using bash konsole [duplicate]

when iuse the konsole for a period of time I sometimes have to scrollup to remind myself what has been going on but most of the text is green on black, warnings are purple and error messages are red. ...
8
votes
2answers
229 views

PS1 prompt to show elapsed time

I currently use this to display the current time in my bash prompt: PS1=\[\e[0;32m\]\t \W>\[\e[1;37m\] 20:42:23 ~> Is it possible to display the elapsed time since the previous prompt? Such ...
0
votes
1answer
31 views

How do I write a Bash script that will ask users to define a variable?

I am presently modifying this shell script to turn it into a shell script for installing Arch Linux, with custom username(s), password(s), etc. At the moment I am wondering what I need to do in order ...
1
vote
1answer
40 views

Bash $PS1 collapsing in MAC terminal [duplicate]

So I have declared as PS1="\[\W \u\e[0;31m\] ❤ \e[0m\] " in my ~/.profile file. At the start my terminal look like this ~ mihkel ❤ - what is the desired output. But when I'm going back in historly ...
0
votes
1answer
55 views

Why don't I get my bash customizations when I log in normally?

My user's shell prompt is stuck as [bash-4.2]$ and many useful commands like ll don't work on that bash-4.2 shell. I tried the chsh command and usermod commands, but neither fixed this. I've checked ...
4
votes
1answer
67 views

Zsh prompt filling whole width with user input in next line

I'd like to have the left and right prompt in one line and a background color spanning the full line. The user input should be in the next line. hostname | ~/path/to/cwd ...
3
votes
0answers
54 views

Highlight current bash prompt line

I want the terminal to highlight the current bash prompt line. The effect I'm trying to acheive is the same as in text editors where the current line with the cursor is highlighted. Something like ...
2
votes
3answers
105 views

__git_ps1 (current branch) in bash prompt is always out of date somehow

My PS1 in my ~/.bash_profile: export PS1="\\n\[\033[38;5;246m\]\u@\[\033[38;5;245m\]\h\[\033[38;5;15m\] \[\033[38;5;28m\]\w\[\033[38;5;15m\]\[\033[38;5;2m\]`__git_ps1`\[\033[38;5;15m\] ...
0
votes
3answers
64 views

Current directory abbreviation rule in shell prompt

Sometimes I see that the current working directory in shell prompt is abbreviated and sometimes not. For example /usr/bin will be displayed as bin$ or /folder1/folder2 displayed as folder2$, in ...
0
votes
1answer
77 views

How to remove the return code from the terminal prompt in Sugar on a Stick?

I am using Sugar on a Stick (Fedora 23) 0.106 for i686 as a distro. Here's the link to the website of this distro: https://sugarlabs.org When I use the terminal I get a very weird behaviour. For ...
1
vote
2answers
63 views

How to Display only the Working Directory Name in Shell Prefix? [duplicate]

I'm currently working in a really long directory. Probably something like: ~/Documents/c_prog/this_is_a_really_long_project_name/sub_directory/test_case/ It would be awesome if I could execute a ...
0
votes
0answers
61 views

Bash prompt time is not always updating

Before I start, this is not a question about how to customize PS1. I have already customized mine and I'm quite happy with it. I usually work in a remote server with SuperPuTTY, which allows me to ...
0
votes
2answers
44 views

Why in booting prompt characters become suddenly bold?

I run debian jessie 8.0, when I turn on the pc my booting prompt become dark for a moment and then all the characters become bold. Is it normal? How can I change the appearence of booting prompt?
1
vote
0answers
35 views

Bash prompt - backspace deletes right aligned text (possible to stop?)

I have a really annoying problem. I have followed all of the protocol for making a bash PS1. I know about surrounding non-printable characters with \[ and \] or \001 and \002; however, I have a ...
0
votes
0answers
7 views

Command prompt in CentOS [duplicate]

I think I have a simple problem but I haven't found the solution to it yet. My command prompt has been changed somehow. So I have this How to change it to this or something like that (I took ...
0
votes
1answer
58 views

problem with 256-bit color codes in bash prompt

Here is my bash prompt; I'm using ANSI escape sequences reset="\033[0m"; blue="\033[38;5;20m"; cyan="\033[38;5;38m"; green="\033[38;5;35m"; yellow="\033[38;5;227m"; white="\033[38;5;250m"; # Set ...
12
votes
2answers
322 views

How can I make commands appear bold in zsh?

I have set up my bash shell so that any commands I type appear in bold and the commands' output is shown in normal weight: I did this by adding \e[01m at the end of my PS1 variable to turn on bold, ...
0
votes
1answer
43 views

bash prompt not wrapping as expected

Here it is: Captures git branch for prompt: parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export ...
6
votes
1answer
101 views

Change in bash prompt depending on whether first character is a space

Right now every command which starts with a space character gets ignored by bash history (HISTCONTROL=ignoreboth in ~/.bashrc). I would like to have a better visual cue when I press space as the first ...
3
votes
3answers
61 views

how to make bash prompt more readable in .bashrc - this is do with date but even overall

This is my .bashrc or at least the section containing the prompt - # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in ...
0
votes
1answer
55 views

Redirect all output with prompt to a file

What is the shortest way to redirect: $PROMPT, last executed command, stdout and stderr into single file? Of course, we might use &> to redirect stdout and stderr into single file and then add ...
0
votes
1answer
63 views

Why does my terminal window say android before the user?

This is what is looks like when I open a new terminal. Im not sure what the text before the ~ user$ is supposed to mean but it seems really weird that is says android-some_alphanumeric_id.
0
votes
3answers
51 views

bash script not creating alias and not updating $PS1 [duplicate]

I thought I will write a bash script to set the alias I frequently use, and also to change the command promt. Below is my script. #!/bin/bash # Make useful aliases alias c='clear' alias p='pwd' ...
1
vote
2answers
27 views

Changing how the directory name is displayed in Ubuntu terminal

When I change directories in the Ubuntu terminal the full path of the directory is displayed. How can I change it so that only the current directory I am working in is displayed? ...
0
votes
2answers
142 views

what does 'tc@box:/home$' mean? [closed]

I was wondering what this means? I know that CD stands for change directory does this take me to the home directory, if so what does $ mean?
4
votes
1answer
60 views

Unknown word comes up automatically after changing password on a user

I am using Redhat 5.4 and when I tend to change Oracle user password this comes up right after hitting Enter: passwd oracle Retype new UNIX password: passwd: all authentication tokens updated ...
6
votes
1answer
337 views

Keep bash input on top line of screen

I'd like to keep the bash command prompt input at the top of the screen so that outputs from older commands are pushed downwards rather than up. How can I achieve this?
2
votes
3answers
740 views

How to show the host name in Linux commandline prompt

I have several VMs and right now my command-line prompt looks like -bash-3.2$; identical on every VM, because it doesn't contain the host name. I need to always see which VM I'm on using hostname ...
1
vote
1answer
35 views

tcsh display cursor on next line

I have been trying to get hold of this since many days. Essentially what I need in my tcsh is this [machine_name:current_dir]72 % instead of [machine_name:current_dir]72 % so that I can ...
1
vote
3answers
120 views

Bash prompt string appears in same line as curl command output

When I run a curl command, the json response that it returns collides with the bash prompt string: ~$curl localhost:8001/api {"message":"this is a test message"}~$ Notice ~$ at the end of second ...
3
votes
1answer
70 views

Bash doesn't calculate prompt length correctly

I've googled around quite a bit on this problem and found a few related problems, like this one: Terminal prompt not wrapping correctly. My problem is that bash doesn't calculate the length of the ...
2
votes
2answers
202 views

Change PS1 color when connected to other host via SSH

I'm trying to change PS1 look based on what host I'm connected in using SSH. My current PS1: PS1='\[\e[1;32m\]\u@\h\[\e[1;34m\] \w\[\e[1;31m\]$(__git_ps1)\[\e[1;0;37m\] \$\[\e[0m\] ' For host host1 ...
2
votes
3answers
649 views

Show only current and parent directory in bash prompt

I'm new to bash and would like my prompt to show something that in tcsh was trivial, yet after a good google search I still cannot do. I would like my prompt to include only the current and parent ...
0
votes
1answer
95 views

Bash overwrites the first line when using custom PS1 prompt [duplicate]

My question is similar, but different to, this question. I have created a custom PS1 in my .bashrc, as follows: STARTCOLOR='\e[0;36m'; ENDCOLOR="\e[0m" export PS1="\n$STARTCOLOR\u@\h:\! <\t> ...
0
votes
0answers
45 views

Adding strings in front of the prompt

I am trying to add an additional string in front of the 'login' names that I usually see in my terminal. Currently, this is what I am seeing, where 'zac' is my user alias and 'titem' is my machine ...
0
votes
1answer
61 views

PS1 variable inheritance between scripts and programs using bash in AIX

How can I ensure that PS1 variable in AIX bash is inherited between cross calling of scripts and programs ? Suppose a program gives to the user a shell instance such as the shell command of vi. This ...
-1
votes
2answers
150 views

bash scripting and PS1 prompt

Im trying to customize the way the PS1 prompt shows in terminal and CLI on Arch Linux, but it's not printing the proper thing it should be doing. First up is I'm trying to colorize parts of the PS1 ...
0
votes
0answers
19 views

Why is Debian's PS1 variable different from the other distros? [duplicate]

I've noticed that Debian's PS1 variable is a little different. For example: root@debian:~# echo $PS1 ${debian_chroot:+($debian_chroot)}\u@\h:\w\$ What is this part: ...
2
votes
1answer
185 views

How can I make Debian 8's terminal show box-drawing characters? [closed]

I just upgraded to Debian 8 with a fresh install and my terminal prompt (prompt adam2 8bit with ZSH) no longer displays some characters correctly: I've checked the terminal encoding (set to Unicode ...
0
votes
1answer
135 views

How to edit shell prompt to show time?

I would like to edit my shell prompt to display time. I am currently using zsh, though I would like the customize the shell prompt to show time. I understand that an echo $PS1 will give me the ...
0
votes
1answer
87 views

Describe the prompt I see when I first logged into the Linux computer

Can you please describe and explain each part of the command prompt pi@raspberrypi ~ $ This is what I saw when I first logged in to my Linux computer.