Debian Configuration :: Change Prompt Color In Bash Shell?
Jan 13, 2010
I am getting more and more comfortable working with the shell, thus I would like to change its prompt color to my liking, as it will be easier for me to distinguish commands vs. outputs.
I've read a couple of instructions of how to change the .bashrc file and am familiar with what the codes in PS1 mean. Except, this file can be intimidating to newbie eyes.
Where exactly on the file is it that I need to make the change?
Here is what I am trying to do. I would like my prompt to like exactly like the prompt I use in Backtrack - which consist in two different colors, one for the host and another for the pwd. Here is what the Backtrack .bashrc file looks like:
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.
# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/local/share/man:/usr/bin/man:/usr/share/man
export HOSTNAME="`cat /etc/HOSTNAME`"
[Code]....
I also read that in order to have the same results when I log in as root, I will have to copy the modified .bashrc file into /root
Because I have to stare at my command prompt all the time on my computer, it should look at least half-decent, so I am trying to get it colored. The expected outcome is as seen on this site. I have the colors I want set in my .Xdefaults file, but they of course do not color my prompt.
I looked into my shell 'profile' on my running lenny and copied the PS1 definition over to my [virtual] new squeeze machine, but astoundingly, the prompt does not change!
The prompt always remains to be like this:${debian_chroot:+($debian_chroot)}u@h:w$
This does definitively not stem from 'profile' and I cannot find, where it is defined and how I can override this. If I do it interactively, in a terminal [terminal running in Gnome], it works like expected. In that script, even if I use 'unset PS1',followed by PS1= ... / export PS1, it does not change,Someone with the knowledge and/or a good idea would be great!
I changed the default SUSE prompt setting by modifying the shell variable PS1 to display the following information:
u : the username of the current user h : the hostname up to the first '.' w : the current working directory, with $HOME abbreviated with a tilde
I used export command to setup a new shell prompt:
export PS1="[u@h: w]$ " To add colors to the shell prompt and make a regular user prompt blue I used the following command syntax:export PS1="e[0;34m[u@h: w]$ e[m "
Currently the terminal prompt looks like this:[karlis@karlis-desktop current_folder]$How can I minimize the prompt, so that it only shows $ or # without extra info in square brackets?I checked the preferences for the default Gnome-Terminal and Terminator - there are no settings for this. It is pretty hard to use terminal when working in directories with long names.
When in the interactive envirment, my Input and Output are all mess-up. So i want to color the Input and Output with two different colors.. so i can figure them out..
I have looked almost everywhere for how to change my default shell prompt. When I open my bash shell, the prompt is [fedora-dev@Fedora-Dev Documents]$. I would like it to open at fedora-dev@Fedora-Dev]$.
Can someone tell me where to change this at. I have looked in .bashrc, etc/profile, and environmental variables.
I'm trying to change the Xfce Terminal Emulator prompt from bash-4.1$ to something like what kconsole has. If i issue a /bin/bash -l in the terminal, then I get the prompt and the colors that I want, but I'd like this to automagically happen when I click the Terminal icon in the Xfce panel.This is for Slackware 13.37 (32bit) and Terminal 0.4.6
I have one account on an Ubuntu server with the correct PS1 variable and I want to make one of my other accounts on the same server have the same PS1 variable, so that my prompt on this new account (when I ssh into the machine) is the same as the original account.
Is there a way that I can pass this PS1 variable between accounts so the prompt is the same?
I have tried printing it out, copying the output, and then reassigning it to PS1 on the new account, but it just doesn't work.
I'm trying to change the bash prompt and based on the man pages $ should show a $ which changes to a # for a SU. However, this doesn't happen on my machine, it's $ for both user and SU.The line in .bashrc is:export PS1="u@h:w$"
vi /etc/samba/smb.conf [samba test] comment = client path = /opt/apps/deploy/websites public = no writable = yes
[Code]...
Using the bash shell script the above given samba configuration,the script should automatically add these above given entries in the /etc/samba/smb.conf.can any one help me how to edit the file add entries in the config file using shell script.
I am a newer to debian. I want to change the color of the vitrual terminal. I have found the function " setvtrgb ",but I don't know how to mix the color , Only text green and background black...
I'm running Red Hat Linux 5.4 on HP DL580 server with 16 processors and 64 GB of RAM. I'm connecting to the server remotely through SSH. after entering the password, it takes time to return the command line, if I click ctrl+c during this time, I'll have the command line prompt but not the correct bash prompt (I have to run bash to pass to my correct prompt).I tried to install Apache on the server, ./configure took 4 hours to finish instead of 1 or two minutes, Oracle installation same behavior. Server Disks are mirrored using RAID controller.
how do we control the display color quality in Debian, similar to setting 16 bit or 32 bit in Windows? I have Lenny on a notebook and Squeeze on a netbook, but cannot find a menu to set it. They both have the default vesa driver.
It's debian testing with lxde.image is attached.In gnome the menu color of smplayer is white but here in lxde it's off-white/yellowish.Is it for theme/icon?It seems it's the color for x-window.
poking around in the system settings nor Google are cooperating, so: How do I change the colour of the font on my desktop? I'm running Cinnamon (on Sid) and I've got a background with a lot of black in it, which makes the names of icons impossible to read. I know what everything is, of course, but I'd still like to be able to see what it is.
I'm using Robolinux Cinnamon which is Debian 8.2 (fantasic OS btw). I usually use a blank, black wallpaper but the default color of the icon font is black. I googled this question for about an hour before I came here. How to change the icon font color on the desktop to white?
I'dont get prompt for passphrase for decrypt luks during boot.Instead it says 'error: device name required, press any key to continue"
Grub.cfg: http://pastebin.com/GZsuXp1y kernel: linux-image-4.3.0-1-amd64 video with issue: https://www.youtube.com/watch?v=13ruhtUcwRo&feature=youtu.be VM disk has 2 partitions: sda1 with /boot sda2 - luks encrypted
I installed 2.6.38 from backports. It boots OK, and among the start-up messages it says it has started kdm, but then it offers only a console login prompt, no GUI. I assumed (perhaps optimistically?) that newer kernels would be backward-compatible, and that any dependencies on other software would be enforced by the package mechanisms. Running amd64, Squeeze, KDE.
On a Debian 5.0.8 I have a problem with OpenSSH server (sshd): when connecting to it from another host there is always a 10 seconds delay before sshd gives login prompt to the client. After the connection is established the communication goes on without any interruption. This long delay started to happen a few months ago and sshd_config was not changed at that time.
Here is a short description of the conversation between the putty client (on MS Windows) and sshd: - putty client starts connection to sshd - 10 s delay - sshd returns "login as:" - user types username in putty window - sshd returns "password:" - user types password in putty window - sshd returns MotD and shell prompt
Here is a short description of the conversation between the OpenSSH client (on a Debian 6) and sshd: - client does "ssh user@host.foo.bar" - 10 s delay - sshd returns "Password:" - user types password - sshd returns MotD and shell prompt
I tried connecting from: - local host - NO DELAY - a host on the same subnet - delay exists - a host on another subnet - delay exists
I've found the following suggestions but to no avail (of course I restarted sshd after changing its configuration): - on server put "UseDNS no" at the end of /etc/ssh/sshd_config - in /etc/hosts on the server define mappings between IP addresses and host names for the ssh clients - on client use "GSSAPIAuthentication no" in /etc/ssh/ssh_config
1. am required to create a bash-shell script called terminator that terminates all processes of a name given to the shell script as an argument. Make sure the terminator shell script will not take any crucial file system services as arguments.
2. Show how you would configure an Ethernet card by reapplying your existing IP and network mask
3. Install a workable nfs file sharing system between your system and a remote system, using optimum values for resize and wsize.To demonstrate send a 512Mb block of random data between client and server using the dd command.Write down the relevant steps and procedures
I know I was asked about wanting to change/upgrade my shell during the upgrade from Lenny to Squeeze, but I can't remember what it said, and I can't find any documentation about it online. But did something change to bash? Is this documented somehwere?Most notably I see progress messages on one line, overwriting eachother (for instance during an aptitude safe-upgrade).
I am *finally* getting around to rebuilding my file-sharing computer. I'll be sharing files with both Linux and Windoze machines. It's a home network, so there's nothing fancy needed. I know I have to tweak my smb.conf file until I'm satisfied with the features and security. I'm using SWAT and I'm starting with a bare-bones conf file. It's not secure but I can see the server and selected files/directories from my other Linux box.
My really dumb question is, do I have to reboot both the server and the client machines every time I change the SAMBA configuration? I thought I just had to stop and restart the SAMBA service in the SWAT software - but then the server disappears from my client. It looks like I need to reboot both machines for the client to see the server.
I am running a Java application on the command line bash terminal under Mint Debian. I have JDK1.6.0_22 installed 64-bit, and the OS is 64-bit too. I have a few JAR files in the directory and a few native LWJGL libraries. When I run the application using the command line, all works fine. Lets assume my directory where the files are is called /home/riz/MyGame. I change to that directory and this is the command I use code...