Home  >  Q&A  >  body text

debian - bash configuration for new linux users

In the newly installed debian server, bash under root has configurations such as username@current directory, arrow keys and shortcut keys available, but when I create a new user, there are no related functions. Shouldn't the configuration that root can use be the global configuration in etc? How to let new users have the same bash configuration as root.


Solved, the reason is that the default shell for new users is not bash

仅有的幸福仅有的幸福2651 days ago999

reply all(2)I'll reply

  • 三叔

    三叔2017-06-17 09:17:43

    Generally speaking, /root/.bashrc is root’s private bash configuration. Copy this file to /home/username/.bashrc, and new users can use the same configuration as root. In addition, some special configurations for the root user in .bashrc need to be changed after copying.

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-06-17 09:17:43

    For Debian/Ubuntu-like systems, by default, bash will execute /etc/bash.bashrc first, and then execute the ~/.bashrc file. If no ~/.bashrc file exists, It will also execute /etc/bash.bashrc, which means there is a default configuration.

    reply
    0
  • Cancelreply