Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

4.05.2024

Linux systemd services

https://www.tecmint.com/list-all-running-services-under-systemd-in-linux/

1. List all services
# systemctl --type=service

2. Get service status
# systemctl status sentinel_26379.service

3. Restart service
# systemctl restart sentinel_26379.service

7.20.2017

Change bash command prompt in Debian

Followed this post

$ vi /etc/bash.bashrc
Add this at the end:

# If id command returns zero, you have root access.
if [ $(id -u) -eq 0 ];
then # you are root, set red colour prompt
   PS1="\\[$(tput setaf 1)\\][\\u@\\h:\\w] (apps)# \\[$(tput sgr0)\\]"
else # normal
   PS1="[\\u@\\h:\\w] (apps)$ "
fi