The prompt is what asks a user for their interactive input

learn more… | top users | synonyms

5
votes
2answers
1k views

Why does setting the bash prompt (PS1) manually cause root to have a $ instead of a #?

I'm on CentOS 6.4. By default the root user's prompt has # symbol, i.e. it looks something like [root@myserver ~]# . echo $PS1 prints out [\u@\h \W]\$; but if I do PS1="[\u@\h \W]\$" (which shouldn't ...
9
votes
5answers
22k views

How to Run an app as Administrator without the prompt?

When I start SQL Server Management Studio 2008, I an error that's been around forever and is documented here. One of the suggestions to fix it that actually worked was to start SSMS with Run as ...
1
vote
1answer
18 views

How do I get fish shell prompt to show the hostname?

I'm attempting to make my Fish prompt look like the old Gentoo shell did. user@hostname ~ % where the user@hostname is green, and the $PWD and symbol were blue. Right now it only shows: user@ ~ %, ...
0
votes
2answers
37 views

Pinging My phone [closed]

I have recently lost my phone and I really need to find it I was searching on how to ping it for its location but I still haven't found any useful information. Is it possible I could ping it from ...
0
votes
1answer
35 views

Prompt command starting in the wrong folder [duplicate]

I am currently facing an issue I do not know how to track. I put the start-in option of a prompt command to : C:\Users\XXX\Downloads Then apply and finally when I open the prompt command, it ...
3
votes
2answers
5k views

How do I enable my network connection using command prompt?

How do I enable my network connection using command prompt? I've tried: netsh interface set interface "Local Area Connection" ENABLE But received this error: An interface with this name is not ...
3
votes
3answers
263 views

Custom prompt doesn't work on Mac Terminal

I like to use a custom prompt (current path in blue) on my unix machine: export PS1='\[\e[0;34m\]\w \$\[\e[m\] ' But when I try to use it on Mac's terminal it doesn't work: it fails to detect the ...
1
vote
2answers
41 views

How do I remove the extra bash-3.2$ from shell-mode?

Summary The first line of shell-mode has an extra bash-3.2$ prompt before my custom dotfiles (master)$ prompt. I tried writing PROMPT_COMMAND='' in my ~/.bashrc according to an earlier Stack ...
4
votes
3answers
254 views

How to redirect output of a command to a file when the command will prompt user inputs?

I have a command which will prompt user for some inputs and then output the result to the terminal. I typed the command like below to redirect the output to a file: $the_command > abc.txt But it ...
7
votes
3answers
5k views

Lightning bolt for prompt (PS1)

I've seen on a few screencasts a while back where someone had a lightning bolt instead of $ on the bash prompt. Does anyone know how to do this?
0
votes
0answers
19 views

posh-git not reading my profile

I'm using posh-git (part of Github for Windows). I want to set a custom prompt as in this question. However, posh-git is not reading my profile file. I have tried: Running PowerShell as ...
1
vote
1answer
40 views

How to make zsh always show environment variable name instead of the path?

I have an environment variable set to my projects folder like this: PROJ=$HOME/projects When I want to open a project folder i just type PROJ/project_name and the shell opens the directory and my ...
1
vote
1answer
16 views

$status in Fish prompt always prints 0

I tried to add $status to my prompt in the fish shell but it always prints 0. This question was asked on irc a while back and i'm surprised there wasn't a answer here so i thought i'd post it here ...
0
votes
1answer
92 views

command to pipe in password when prompted by command prompt

runas /profile /user:administrator "cmd /c net user /add [username] [password]". I used the above command to create a new user using administrator permissions. After I enter this command, it prompts ...
0
votes
1answer
23 views

My bash_prompt cannot find a shell script

This is a function I added to my .bash_prompt function look_for_autorun() { echo "checking file" FILE="autorun.sh" if [ -x $FILE ] then echo "File '$FILE' Exists" else ...
0
votes
0answers
73 views

Find and delete characters special in text file batch file

Example: three text files: 1.txt contents store is: 7.1M 2.txt is 72M 3.txt is 7.21M I would use batch file to scan these three text files and output: 1.txt is 7 2.txt is 72 3.txt is 7 Thank ...
39
votes
3answers
21k views

OpenSSL without prompt

I am using following code to generate keys: apt-get -qq -y install openssl; mkdir -p /etc/apache2/ssl; openssl genrsa -des3 -out server.key 1024; openssl req -new -key server.key -out server.csr; cp ...
0
votes
1answer
36 views

how to migrate bash prompt \#/\! to zsh

My bash prompt currently starts with the following variables : \#/\! which means \# The command number of this command. \! The history number of this command. So \# is specific to each ...
1
vote
1answer
132 views

Interactive Script; Prompt within a loop

How do I prompt a user for input from a shell script (ksh) within a loop in which a file is read? The script reads in a file. In each loop pass the user will be asked if he wants to cancel or not? ...
4
votes
2answers
496 views

Why does this bash prompt sometimes keep part of previous commands when scrolling history?

My bash prompt, which I'll admit to have stolen from a few places and cobbled together, will sometimes add part of previous commands to its length when scrolling the bash history with up/down arrows. ...
0
votes
2answers
914 views

Changing the prompt in telnet

With some help from people on here, I was able to set a custom prompt in an ssh session (thanks!). Now I need to do the same in telnet, but I'm not sure of what syntax I could use for that. ...
0
votes
2answers
839 views

Changing the prompt when ssh to another box

I want to be able to set a custom prompt (to help with automating jobs, the prompt should be something I can reliably detect). I found I am able to set the prompt remotely, like this: ...
11
votes
8answers
5k views

Pushing my PS1 prompt over ssh

I use a specific PS1 prompt that I like. I share a few logins with other other people on a few different servers. I was wondering if there was a way to specify in my local bash profile a remote prompt ...
1
vote
0answers
118 views

Alternative ways of passing PS1 env variable into Ubuntu for SSH session

I know that there are twenty thousand answers, none of them worked as expected, I'm more surprised than you are, so please consider reading the story first. I'm trying to achieve what appears to be a ...
4
votes
1answer
200 views

Logging into hotel Wi-Fi changes bash prompt? [duplicate]

Since clicking on the “I agree” pop-up when logging into a hotel Wi-Fi, my bash prompt contains some kind of hash in it. The format is now: <strange hash>:<working dir> <username> ...
12
votes
3answers
3k views

zsh right-justify in ps1

I'd like a multi-line zsh prompt with a right alined part, that will look something like this: 2.nate@host:/current/dir 16:00 -> I know about ...
0
votes
0answers
47 views

Change the prompt on all xfce-terminals only

I have two terminals installed, gnome-terminal and xfce4-terminal. I would like to have only the xfce terminal showing a simple > as prompt when I start it. The gnome-terminal should remain ...
13
votes
3answers
7k views

How do I hide the path in command line prompt on Windows?

I'm working on Windows 7 using the cmd console. How do I hide the path in the prompt?
1
vote
0answers
286 views

Save PDF automatically on exit in Adobe Reader

Adobe Reader prompts me to save on exit. This is an operation I do several times a day every day, so if I Adobe Reader could just save my changes without asking me (that is, comments), that would be ...
2
votes
2answers
7k views

modify login prompt or header (/etc/issue) to display ip address of the machine

I work with a lot of virtual machines. For testing and preproduction set up. I would like the login promt or header to display the ip address of the machine. That way when I start it up I can see ...
0
votes
1answer
566 views

Kill Process Listening on Port 8080

I perform the following on Win7 32-Bit in the command prompt: netstat -ano | findstr 8080 it returns with: TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 1896 how might I ...
0
votes
2answers
1k views

How to turn off asking for administrative rights every time I want to rename/copy file from one location to another in Windows 8.1 64bit

I installed fresh Windows 8.1 Professional 64-bit. When I copy file to another location, for instance from C:\ drive to external drive I get prompt where I have to click Continue to grant ...
30
votes
3answers
9k views

Tmux and ZSH custom prompt : bug with window name

I have customized my ZSH prompt with oh-my-zsh to make it more readable and add information about git if I'm in a repository. Example : bob@inf [~/docs] % bob@inf [~/src/nicest] master % (in a git ...
0
votes
1answer
45 views

Enable Logoff Prompt

As a new user to Remote Desktop, I mistakenly told the warning prompt about closing the session that I didn't want to be warned again. Since I can't seem to remember to logoff the CORRECT way, I ...
1
vote
0answers
145 views

Windows 8.1 mark an account as a Trusted UAC Account

From what I understand in windows 8 if you want to use/enable UAC you get a prompt unless you hack an icon or use the local SYSTEM account. I am fine with this, however is there a way to make a ...
16
votes
4answers
3k views

MySQL command line color prompt

I want to add colors to the MySQL command line color prompt. I have so far in a script (database.sh): mysql -uroot -hlocalhost -A --prompt="\u@\h:\d> " I would like root to be red, @ to be ...
2
votes
2answers
881 views

How to change the prompt of mc's subshell

I often use the subshell of mc. So I want the promt of mc-subsell to be different form the primary shell. Say, how can I change the sub-prompt like this: mc:$Current_dir$ many thanks
1
vote
2answers
47 views

Search-and-go in Windows CMD

I know that for file search on Windows CMD one can use the following command: dir /S /P "PATH/FILENAME" Is there an easy way to go straight to the result directory. For example, the requested file ...
-3
votes
1answer
76 views

Access c:\“ my path ” in windows command prompt

I want to access a path in C drive when I open the command prompt I have c:\user\myname where is I want to access c:\ so that I can access any paht I want in C
2
votes
0answers
286 views

My custom fish shell prompt keeps resetting every reboot

I switched to fish shell a month ago and I'm quite pleased with it. But recently, my custom prompt keeps resetting to the default prompt every time I turn on my PC. When opening the terminal, I'm ...
0
votes
2answers
37 views

Bash prompt coloring not appearing correctly

I had a functioning Bash prompt colored how I wanted it, but after reinstalling the background is gray rather than black like this setting should make it. My PS1 is \[\e[33;40m\]\T ...
1
vote
1answer
2k views

Schedule a task with admin privileges without a user prompt in windows 7

In windows 7, I'd like to schedule a program to be run with administrative privileges, without having the user need to respond to a prompt (which requests elevated privileges) every time the scheduled ...
2
votes
0answers
156 views

Open in Command line doesn't work anymore since the last windows update

Since the last Windows update (2013/11/12), this doesn't work anymore on Windows 7 64bit: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmd] @="Open cmd ...
0
votes
0answers
51 views

Bash Prompt : incorrect time displayed

Using the following prompt: export PS1="\n[$(date +%d-%m-%Y)] \u@\h [\t]\n{\w} [\!] # " and with TZ to my timezone : echo $TZ = America/Montreal The time on the prompt is OK at the start of a ...
0
votes
1answer
110 views

What 016 017 in bash prompt, how can I make it correct in Terminal

I saw a beautiful bash prompt here PS1="\n\[\e[30;1m\]\[\016\]l\[\017\](\[\e[34;1m\]\u@\h\[\e[30;1m\])-(\[\e[34;1m\]\j\[\e[30;1m\])-(\[\e[34;1m\]\@ ...
0
votes
0answers
21 views

Customized bash prompt (PS1) issues when text moving to next line and back.(word wrapping) [duplicate]

I'm using a customized prompt which includes and output of a "case" script and also colors it. When the text is colored I'm having line wrapping issues, when I remove the color - the issue is gone. ...
0
votes
2answers
61 views

Making PS1 prompt refreshable

I want my prompt to be changed based on an output of a certain command. and based on the command result to add a color. example: run the command: cphaprob stat | grep local | awk '{ print $NF }'` ...
0
votes
0answers
87 views

how to list all CNAMEs of the current server in the bash prompt?

I have servers with a generic names (e.g. eu1.example.com) which has a set of useful CNAME (e.g. mail.example.com, rocket.example.com). How can I list the CNAME in a bash prompt, to go from ...
11
votes
2answers
2k views

Escape non-printing characters in a function for a Bash prompt

In a Bash Prompt (PS1 variable), I'm calling a function to potentially add text to the prompt: export PS1="\u@\h \$(my_function) \$ " However, the function in the prompt contains ANSI color codes ...
0
votes
1answer
1k views

How to configure internet explorer to block download prompt for csv files

How to configure internet explorer to avoid save or cancel prompt while downloading .csv file and download the csv file.