Skip to content

Instantly share code, notes, and snippets.

@Anon-Exploiter
Last active June 9, 2020 09:59
Show Gist options
  • Save Anon-Exploiter/7132908d8fc055eb564751c8ff69e17c to your computer and use it in GitHub Desktop.
Save Anon-Exploiter/7132908d8fc055eb564751c8ff69e17c to your computer and use it in GitHub Desktop.
Adding colors with PS1 in Docker container/image in linux distros
FROM kalilinux/kali-rolling:latest
RUN echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /root/.bashrc
WORKDIR /root/
CMD ["bash"]
@Anon-Exploiter
Copy link
Author

Can also use wget to download .bashrc containing custom aliases, functions you want along with the coloring. The colors are red as of now.

Also, kalilinux isn't required, you can change it to any linux distribution (ubuntu, fedora, etc.)

Can be built with:

docker build -t customkali .
docker run -it --rm customkali

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment