2

first say hello, I'm new to the site. I just installed Ubuntu 16.04.4 LTS on my computer and I still have to familiarize myself with the OS. One of the things I can not change is the appearance of LXTerminal, which comes from black background and white letters. I just wanted to change, for example, the color of the place where I am. Example: user @ user: ~ / Documents $ As I say, everything is blank. Only the directories that are blue change. I have seen several articles, but in none I find the editing tools that this console has. It shows me: Edit> Preferences> And there are only four tabs to choose from: Style, Show, Advanced, Shortcuts I can not find a way to give it a little appearance, I have seen that with commands it is also possible, but with what I saw so far I am not capable. If you can give me some idea or where to look for information. Thank you

  • 1
    Welcome to Ask Ubuntu. Your prompt is $PS1; you change it to control the text that makes you prompt (and the colors used). Refer to askubuntu.com/questions/984060/…. Note if you change $PS1, it effects new terminals and not your current one (unless...) Try echo $PS1 to view your current prompt value – guiverc Jul 9 '18 at 11:08
  • Hice eco en $ PS1 y el resultado fue: \ [\ e] 0; \ u @ \ h: \ w \ a \] $ {debian_choroot: + ($ debian_chroot)} \ u @ \ h: \ w \ $ No sé exactamente QUÉ y CÓMO modificar para poder cambiar los colores . Volveré a revisar la documentación que se encuentra en las preguntas y enlaces que me propuso. Gracias @guiverc por el apoyo. Si lo consigo, comento y puedo responder. – Mari Cruz Fernandez Jul 9 '18 at 11:43
  • Have a look at help.ubuntu.com/community/CustomizingBashPrompt which I think is more helpful. Even if you didn't understand all of the post I provided in my first comment, I hoped it'd provide clues helpful for your search in how. – guiverc Jul 9 '18 at 12:12
  • Thanks, I've been lost all day without getting anything. Edit the file as it comes in the documentation to change the user name and directory to green and the commands to target, without success, everything goes blank: if ["$ color_prompt" = yes]; then PS1 = '[$ FGRN $ {debian_chroot: + ($ debian_chroot)} \ u $ FGRN: $ FGRN \ w $ FGRN] \\ $ RS' else PS1 = '$ {debian_chroot: + ($ debian_chroot)} \ u @ \ h: \ w \ $' – Mari Cruz Fernandez Jul 9 '18 at 15:24
  • 'code' is difficult to read in comments; if you need to paste things like that put it in your question, ideally with a short note as to why & separation if needed. Questions & Answers can be edited & allow far greater formatting. $FGRN needs declaration; did you define it? (the FGRN="[\033[32m]" step; I didn't try and read your shell sorry). If you're still having troubles, search for other howto's (eg. howtogeek.com/307701/…) as it's a bash issue, and the same in almost any *nix – guiverc Jul 10 '18 at 3:48
0

If you want colours you have 2 easy options.

  1. Upgrade to 18.04, the new terminal has a funky colour scheme.

ubuntu 18.04 colour scheme

  1. Go to software and download terminal.

System tools-> Software, then search terminal. The store typically has pictures from which you can get a feel for its functionality.

0

First backup using cp ~/.bashrc ~/.bashrc-backup

Edit the file ~/.bashrc and replace these lines:

if [ "$color_prompt" = yes ]; then
    PS1='───────────────────────────────────────────────────────────────────────────────
${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='───────────────────────────────────────────────────────────────────────────────
${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

Save the file and reopen the terminal to see if you like it.

If you don't like it restore the backup with: cp ~/.bashrc-backup ~/.bashrc and reopen the terminal.

What it looks like

bashrc2.png

NOTES:

  • You don't need 18.04. This works in Ubuntu 16.04 and Lubuntu 16.04 (but the background there is black and the fonts are as well defined)
  • Thank you @WinEunuuchs2Unix, this is what I did but I have not replaced correctly since everything is still blank. What should I put so that the user and directory where I am are green and the ones I write blank? Sorry for the delay in responding. – Mari Cruz Fernandez Jul 10 '18 at 9:40
  • @MariCruzFernandez The contents of your ~/Documents, ~/Music and ~/Pictures directories will all be blank until you save some new work into them. Try ll /etc if you want to see a directory with files. – WinEunuuchs2Unix Jul 10 '18 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.