From ffb00611bde705b0ed25333d7031561bb2e3fe5d Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Thu, 30 Aug 2012 19:55:53 +0300 Subject: [PATCH] bashrc & zshrc: add alias refreshgroups to update groups without logging out. Source: http://blog.edwards-research.com/2010/10/linux-refresh-group-membership-without-logging-out/ via Google. --- bashrc | 3 +++ zshrc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/bashrc b/bashrc index 8ea4da00..8cb116e5 100755 --- a/bashrc +++ b/bashrc @@ -330,6 +330,9 @@ alias myip6="curl -s6 http://icanhazip.com" # Curl instead of wget with warning alias wget="echo Running curl -LO instead of wget && curl -LO " +# Update groups without logging out. Requires entering password. Source: http://blog.edwards-research.com/2010/10/linux-refresh-group-membership-without-logging-out/ +alias refrshgroups="exec su -l $USER" + # Allow custom aliases to be put in .aliases or .bash_aliases . # .aliases diff --git a/zshrc b/zshrc index b434d6f8..505f4757 100755 --- a/zshrc +++ b/zshrc @@ -279,6 +279,10 @@ alias myip6="curl -s6 http://icanhazip.com" # Curl instead of wget with warning alias wget="echo Running curl -LO instead of wget && curl -LO " +# Update groups without logging out. Requires entering password. Source: http://blog.edwards-research.com/2010/10/linux-refresh-group-membership-without-logging-out/ +alias refrshgroups="exec su -l $USER" + + # .aliases if [ -f ~/.aliases ]; then source ~/.aliases