• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

No configuration file ~/.bashrc in Bash.

Scheduled Pinned Locked Moved General pfSense Questions
3 Posts 2 Posters 1.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    Sopalajo de Arrierez
    last edited by Jan 10, 2016, 12:09 AM

    I have installed Bash on my pfSense v2.3:

    [luis@pfSense-ThreepWood ~]$ bash --version
    GNU bash, version 4.3.42(1)-release (amd64-portbld-freebsd10.2)
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http: gnu.org="" licenses="" gpl.html="">
    
    This is free software; you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.</http:>
    

    And would like to customize it, but I have found no "~/.bashrc" file:

    [luis@pfSense-ThreepWood ~]$ pwd
    /home/luis
    [luis@pfSense-ThreepWood ~]$ ls -la
    total 56
    drwxr-xr-x  4 luis  luis   512 Jan 10 00:54 .
    drwxr-xr-x  3 root  wheel  512 Jan  9 14:49 ..
    -rw-------  1 luis  luis   564 Jan 10 00:54 .bash_history
    -rw-r--r--  1 luis  luis   994 Jan  6 17:18 .cshrc
    -rw-r--r--  1 luis  luis   186 Jan  6 17:18 .login
    -rw-r--r--  1 luis  luis    91 Jan  6 17:18 .login_conf
    -rw-------  1 luis  luis   301 Jan  6 17:18 .mail_aliases
    -rw-r--r--  1 luis  luis   267 Jan  6 17:18 .mailrc
    -rw-r--r--  1 luis  luis   743 Jan  6 17:18 .profile
    -rw-------  1 luis  luis   212 Jan  6 17:18 .rhosts
    -rw-r--r--  1 luis  luis   909 Jan  6 17:18 .shrc
    drwx------  2 luis  luis   512 Jan  7 14:16 .ssh
    drwxr-xr-x  2 luis  luis   512 Jan  7 14:07 Temporal
    

    So I have created it and added my PS1 customization command (that works OK from shell):

    nano ~/.bashrc
    export PS1="${debian_chroot:+($debian_chroot)}\[\033[00;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
    

    But, after logout (and even after reboot), the prompt has not changed, so I suppose the "~/.bashrc" file is ignored.

    How can I do to make this file to be read?
    If this is not the proper file in this version of Bash, where may I customize my shell (things like adding alias or environment variables)?

    (Should this question go to a generic FreeBSD forum, or can it fit here? I don't know if this an issue only for pfSense)

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Jan 10, 2016, 4:12 AM

      A general FreeBSD forum would be better for that but it's not a really complicated issue.

      It depends on how you login and/or how the shell starts. Try making .bash_profile instead, or linking the two.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • S
        Sopalajo de Arrierez
        last edited by Jan 10, 2016, 12:43 PM

        @jimp:

        A general FreeBSD forum would be better for that but it's not a really complicated issue.

        It depends on how you login and/or how the shell starts. Try making .bash_profile instead, or linking the two.

        Indeed, this worked:

        $ mv .bashrc .bash_profile
        

        I will anyway ask on a FreeBSD forum and post the link here, for those interested.
        Thanks you.

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received