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
9 views

Setting up command promt in tcsh to show only last 3 working directory instead of complete path?

I have command prompt in tcsh that shows the current working directory. The problem is that the command prompt becomes very big once I am in a deep hierarchy of folders. How do I set the command ...
1
vote
1answer
34 views

Save cursor position and restore it in terminal

I am playing with some terminal capabilities to create async prompt output on bash. I want to get something like this: while outputting string in PROMPT_COMMAND, save terminal cursor position, print ...
4
votes
5answers
422 views

Can I display GIT in prompt when current directory has a .git folder?

Can I display GIT in prompt when current directory has/contains a .git folder? Is there a way to do this? My current prompt is defined like so: export PS1="[\u@\h] \w $ " So, my prompt looks ...
0
votes
0answers
16 views

Utility for managing and defining prompt definitions

Due to escape sequences, prompt definitions often have dyslexia-inducing complexity. For example, here is one person's definition: ORIG=$PS1 PS1="\[${txtund}${green}\]LOCAL\[\[${reset}\]"; ...
2
votes
2answers
38 views

Prompt: replace custom path with a short word like ~ for home

When I call cd /Users/mu3/apps the prompt simplifies it like this: mu3 [~/apps]: Is this possible to do the same for custom path like cd /Users/mu3/Development/Web/test: mu3 [DEV/test]: I'm ...
3
votes
4answers
101 views

Shorten path in zsh prompt

Bash has the PROMPT_DIRTRIM option, e.g. when I set PROMPT_DIRTRIM=3, then a long path like: user@computer: /this/is/some/silly/path would show instead as: user@computer: .../some/silly/path ...
3
votes
1answer
48 views

What configuration exists in CentOS but not in Ubuntu, which shows user@hostname for remote terminal sessions?

We have a standard "basic server" install of CentOS 6.7 for our servers, and Ubuntu 14.04 for our desktops. From my Ubuntu desktop, when I ssh into a remote server (ie: ssh into a CentOS instance), ...
2
votes
1answer
31 views

What does [vmuser@localhost ~]$ mean?

What does the vmuser, localhost, ~, and $ mean in: [vmuser@localhost ~]$
2
votes
3answers
349 views

New line after the command prompt

Is there any way I can configure terminal applications to display command text from front of $ to under the user name on terminal window? See image attached. I use terminator.
14
votes
7answers
593 views

Compact bash prompt when using a directory tree / filename

In a system with Ubuntu 14.04 and bash, I have the PS1 variable ending with the following contents: \u@\h:\w\$ so that the prompt appears as user@machinename:/home/mydirectory$ Sometimes, ...
3
votes
2answers
210 views

How to change the part after root@

For example. [root@ip-10-0-7-225 ~]# I edited /etc/hosts but it didn't work.
0
votes
1answer
38 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
48 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
69 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
138 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
66 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
169 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
61 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
35 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
104 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
271 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
57 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
45 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
59 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
119 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
69 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
209 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
90 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
126 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
83 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
72 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
56 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?
2
votes
0answers
51 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
92 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 ...
13
votes
2answers
455 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
46 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
106 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
79 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
87 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
93 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
64 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
32 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
186 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
396 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
2k 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
41 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
184 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 ...