Results 1 to 5 of 5

Thread: Changing the Shell prompt color in Ubuntu Server 18.04 LTS

  1. #1
    Join Date
    Apr 2005
    Location
    Portugal
    Beans
    91
    Distro
    Ubuntu 18.04 Bionic Beaver

    Changing the Shell prompt color in Ubuntu Server 18.04 LTS

    Hello,

    Can anyone tell me how can i change the Shell prompt color and the commands i write in it to another color in Ubuntu Server 18.04?
    Is it possible?

    I searched for it but so far i didn't found anything about it!


    Just another question is it possible to install XAMPP or LAMPP in Ubuntu Server 18.04? I ask this because i think this apps have a GUI but Ubuntu Server only has the Shell.


    Many thanks in advanced.

    Pedro

  2. #2
    Join Date
    Jun 2016
    Beans
    1,840
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: Changing the Shell prompt color in Ubuntu Server 18.04 LTS

    Quote Originally Posted by Peter Alien View Post
    Can anyone tell me how can i change the Shell prompt color and the commands i write in it to another color in Ubuntu Server 18.04?
    Is it possible?
    If using bash, as is by default in Ubuntu 18.04, you need to edit ~/.bashrc, look for a line like this -
    Code:
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
    You can change the "32" and "34" (emphasized above) to other numbers between 30 and 37 to make other colors.

    (At the risk of information overload, this post contains a script which when run will show you all the color possibilities and the codes to get them.)

  3. #3
    Join Date
    Apr 2005
    Location
    Portugal
    Beans
    91
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Changing the Shell prompt color in Ubuntu Server 18.04 LTS

    Many thanks, halogen2.

    I changed the colors of the Shell prompt editing .bashrc file. But can you tell me if it's possible to edit the color of the text that i write after the Shell prompt in Ubuntu Server 18.04?

  4. #4
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Changing the Shell prompt color in Ubuntu Server 18.04 LTS

    Quote Originally Posted by Peter Alien View Post
    Just another question is it possible to install XAMPP or LAMPP in Ubuntu Server 18.04? I ask this because i think this apps have a GUI but Ubuntu Server only has the Shell.
    they do not. server editing is done in configuration files.

    MySQL/MariaDB has phpmyadmin which can help you configure it in GUI (in browser)


    XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.
    X stands for the OS. in linux it will change to L so LAMPP or without Perl - LAMP.

    if you want a GUI to administer server have a look at Ajenti or if you want something more like small business server have a look at Zentyal. For home media server the Debian based OpenMediaVault is also good.


    still sooner or later you will get to (text) configuration files. Ajenti comes with nice editor in the GUI.
    Easy to understand Ubuntu manual with lots of pics: http://ubuntu-manual.org/
    Do i need antivirus/firewall in linux?
    Disk backup (works on newer PC): Clonezilla

  5. #5
    Join Date
    Apr 2005
    Location
    Portugal
    Beans
    91
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Changing the Shell prompt color in Ubuntu Server 18.04 LTS

    Many... many thanks mastablasta.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •