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

    Adding better pfsense SSHD navigation…....Updated

    Scheduled Pinned Locked Moved General pfSense Questions
    1 Posts 1 Posters 4.7k 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.
    • J
      jamesdean
      last edited by

      This may help people out there navigate in ssh better.
      This mod will add the time/user/current directory to your terminal prompt in color.  Example: [12:29pm]root@/root#
      The mod will survive a pfsense reboot.

      Backup .cshrc before starting
      Edit .cshrc type:
      ee /root/.cshrc
      Only change the highlighted code after set prompt =
      After editing type:
      source /root/.cshrc
      Make the mod survive a pfsense reboot. type:
      cp /root/.cshrc /root/.tcshrc
      .
      ee .cshrc
      #=========start of code=========
      alias h         history 25
      alias j         jobs -l
      alias la        ls -a
      alias lf        ls -FA
      alias ll        ls -lA

      A righteous umask

      umask 22

      set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)

      setenv  EDITOR  ee
      setenv  PAGER   more
      setenv  BLOCKSIZE       K

      if ($?prompt) then
              # An interactive shell – set some stuff up
              set prompt = "%{\e[1;37m%}[%t]%n@%{\e[0;31m%}%/%{\e[0m%}%{\e[1;37m%}# "[/b]
              set filec
              set history = 100
              set savehist = 100
              set mail = (/var/mail/$USER)
              if ( $?tcsh ) then
                      bindkey "^W" backward-delete-word
                      bindkey -k up history-search-backward
                      bindkey -k down history-search-forward
              endif
      endif
      #=========end of code=========

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.