diff --git a/.bashrc b/.bashrc index 3c21314..9bd40e8 100644 --- a/.bashrc +++ b/.bashrc @@ -11,7 +11,8 @@ # User specific aliases and functions # Execute system startup script: -if [ -f /etc/bashrc ]; then +if [ -f /etc/bashrc ] +then . /etc/bashrc fi @@ -26,14 +27,13 @@ export CVS_RSH=ssh # 1. it is defined in startup script, so every shell gets it! # 2. only shell needs this variable, other programs normally don't need it. # Note 2: Add current directory to PATH is dangerous! -#if [ -e ~/bin/addpath.sh ] -# then +#if [ -e ~/bin/addpath.sh ] then # . ~/bin/addpath.sh ~/bin #fi # Define aliases: # Always list long directory and time. -if [ uname | grep 'Darwin' ] +if uname | grep 'Darwin'; then alias l='ls -lG' alias ll='ls -lGA' # show .xxx @@ -42,6 +42,7 @@ else alias l='ls -l --color=auto' # --time-style=long-iso --color=auto' alias ll='ls -lA --color=auto' alias lll='ls -la --color=auto' + alias emacs='emacs -nw' fi #export LS_OPTIONS='--color=auto' # 如果没有指定,则自动选择颜色 #export CLICOLOR='Yes' #是否输出颜色 @@ -55,7 +56,6 @@ alias ssh='ssh -C -X' alias cvs='cvs -z9' alias ps='ps -elf' -alias emacsnw='emacs -nw' # Set default file permission mask: umask 022 # rwxr-xr-x diff --git a/setup-debian.sh b/setup-debian.sh index 425c2e9..9bc5905 100644 --- a/setup-debian.sh +++ b/setup-debian.sh @@ -37,14 +37,14 @@ passwd echo ">>> Add a new user" useradd $User -# usermod -a -G sudo $User # 允许该账号进行 sudo 来访问关键资源 +# usermod -a -G sudo $User # Add to sudo group passwd $User mkdir /home/$User chown $User:$User /home/$User # emacs /etc/passwd -# Debian 10 默认已经设了 /bin/sh +# Debian 10 default to /bin/sh sed -i "s/\/home\/$User:\/bin\/sh$/\/home\/$User:\/bin\/bash/g" /etc/passwd -# Debian 9 默认为空。 +# Debian 9 default to empty sed -i "s/\/home\/$User:$/\/home\/$User:\/bin\/bash/g" /etc/passwd echo ">>> Allow sudo without password: %sudo ALL=(ALL:ALL) NOPASSWD:ALL"