Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Programming»Bash Shell»How to change output Text color in Linux Shell

    How to change output Text color in Linux Shell

    By RahulNovember 15, 20141 Min Read


    # echo -e “e[0;31mText in Red Colore[0m”

    Advertisement

    The Above commands are showing to set foreground ( Text ) color of output on Linux bash shell. The output of above command will be in red color. There are many other colors available which you can use defined as below. Just replace “0;31” with other color values in above text.

    Foreground ( Text ) Color’s:

       Black        0;30
       Red          0;31
       Green        0;32
       Yellow       0;33
       Blue         0;34
       Purple       0;35
       Cyan         0;36
       White        0;37
    
       Reset Text Color   0m
    

    Use following codes to show text in Bold with same colors.

       Black        1;30
       Red          1;31
       Green        1;32
       Yellow       1;33
       Blue         1;34
       Purple       1;35
       Cyan         1;36
       White        1;37
    

    bash color output shell
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    cp Command in Linux (Copy Files Like a Pro)

    dd Command in Linux (Syntax, Options and Use Cases)

    10 Bash Tricks Every Developer Should Know

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Implementing a Linux Server Security Audit: Best Practices and Tools
    • cp Command in Linux (Copy Files Like a Pro)
    • 15 Practical Examples of dd Command in Linux
    • dd Command in Linux (Syntax, Options and Use Cases)
    • Iptables: Common Firewall Rules and Commands
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.