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

learn more… | top users | synonyms

1
vote
1answer
25 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
48 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
95 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 ...
8
votes
2answers
225 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
2k views

Changing title without changing prompt on Cygwin

I have the following shell script function from this site that allows me to change the title in both Putty and Cygwin. In Putty connected to a Linux host it changes the title and leaves the prompt as ...
11
votes
5answers
3k views

Abbreviated current directory in shell prompt?

vim has a really nice feature which it utilizes in its paths when they're a bit long: It abbreviates the path to the document in the tab at the top. Is there a way to do something similar to this ...
0
votes
1answer
51 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
1answer
50 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
62 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
45 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 ...
0
votes
2answers
764 views

Mac OS X: Terminal Prompt Username

I'm using Mac OS Snow Leopard (v10.6.8). I've changed the account name under System Preferences > System > Accounts > Full Name. However, that does not change the username on the terminal ...
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, ...
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. ...
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 ...
1
vote
1answer
39 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 ...
0
votes
1answer
30 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 ...
4
votes
1answer
57 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
52 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 ...
4
votes
3answers
11k views

How can I change my bash prompt to show my working directory?

I can print my current working dir like this myPrompt$ pwd /Users/me/myDir I want my shell to look like this /Users/me/myDir$ pwd /Users/me/myDir Is that possible? How can I do it?
5
votes
2answers
1k views

How do I make the Xterm window title switch between the current running command and the current path?

I want to set the Xterm window title to switch between two states: When a command is running, show the command name (e.g. "less") When no command is running, show the current path (e.g. "src") I ...
2
votes
3answers
96 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
62 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 ...
2
votes
1answer
209 views

What is and how to use PS1 \#

I put this is .bashrc # colors NC="$(tput sgr0)" RED="$(tput setaf 1)" GREEN="$(tput setaf 2)" # etc ... PS1="\[$BROWN\]\u \[$CYAN\]#\# \[$PINK_BLD\]!\!\[$NC\] \[$BLUE\]\W: \[$NC\]" So deepo #50 ...
0
votes
1answer
70 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
62 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
60 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
43 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?
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 ...
9
votes
3answers
8k views

How can I change what's displayed at a login shell?

I'm getting more familiar with tweaking the way things look in a shell via the prompt (.bashrc), but I'm now trying to change the initial stuff displayed when I first log in. On my EC2 instance, this ...
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
56 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
313 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, ...
1
vote
1answer
108 views

Display present working directory in Terminal

I am a complete newbie to Mac/*nix. This is what I presently see in Mac Terminal as always EN-AAABBBB:~ username$ My understanding is that EN-AAABBBB is my Mac name, followed by username. But I ...
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 ...
1
vote
1answer
321 views

Identify when python script is waiting for a manual input

I'm writing a shell script which executes a Python script. The Python script halts for a manual enter to be provided. However, I don't want to have to press enter each time to the script. Instead, I ...
0
votes
1answer
134 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 ...
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
60 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 ...
0
votes
1answer
54 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
62 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
47 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
139 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?
22
votes
3answers
9k views

Terminal prompt not wrapping correctly

I have an issue where if I type in very long commands in bash the terminal will not render what I'm typing correctly. I'd expect that if I had a command like the following: username@someserver ...
2
votes
1answer
664 views

How can I get KornShell to display the date and time in the prompt?

On my AIX box, which is using ksh as the default shell, I'd like the prompt to show both the date and time followed by a newline \n, along with the name of the machine, and the working directory. ...
2
votes
3answers
1k views

How can I get my PS1 prompt to show time, user, host, directories and git branch

I've seen others add all this information to their PS1 prompt. I like the approaches that colorize the elements and also do a carriage return at the end
27
votes
3answers
19k views

What color codes can I use in my PS1 prompt?

I used several colors in my PS1 prompt such as \033]01;31\] # pink \033]00m\] # white \033]01;36\] # bold green \033]02;36\] # green \033]01;34\] # blue \033]01;33\] # bold yellow Where can I ...
8
votes
3answers
9k views

Colored Prompt in KornShell

According to this StackOverflow post, it is possible have a colored prompt in KornShell. I have not been able to figure out how to do this. I am able to use color: echo -e "\033[34mLinux\033[00m" ...