updated wsl essentials
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
isInFile=$(cat /etc/os-release | grep -c "ID=debian")
|
||||
if [ $isInFile -eq 1 ]; then
|
||||
curl -O http://192.168.1.50/debian/debian-essentials.sh
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
# create akanealw file in /etc/sudoers.d
|
||||
if [[ ! -f /etc/sudoers.d/akanealw ]] ; then
|
||||
echo "akanealw ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/akanealw
|
||||
groupadd sshusers
|
||||
usermod -a -G sshusers akanealw
|
||||
fi
|
||||
|
||||
# remove all motd
|
||||
@@ -18,7 +16,7 @@ apt-get update
|
||||
apt-get upgrade -y
|
||||
|
||||
# download and install packages
|
||||
apt-get install -y curl wget git rsync man-db cifs-utils nfs-common libtalloc2 libwbclient0 net-tools gnupg apt-transport-https tmux gdisk bash-completion openssh-client
|
||||
apt-get install -y lsb-release cron sudo nano curl wget zip unzip git rsync man-db cifs-utils nfs-common parted libtalloc2 libwbclient0 net-tools gnupg apt-transport-https tmux gdisk bash-completion
|
||||
|
||||
# git config
|
||||
git config --global credential.helper store
|
||||
@@ -26,7 +24,19 @@ git config --global user.name "akanealw"
|
||||
git config --global user.email "akanealw@gmail.com"
|
||||
git config --global init.defaultBranch main
|
||||
|
||||
# set input preferences
|
||||
if [[ ! -f /etc/inputrc.bak ]] ; then
|
||||
cp /etc/inputrc /etc/inputrc.bak > /dev/null 2>&1
|
||||
fi
|
||||
rm /etc/inputrc > /dev/null 2>&1
|
||||
cp /etc/inputrc.bak /etc/inputrc
|
||||
echo "" >> /etc/inputrc
|
||||
echo "set completion-ignore-case On" >> /etc/inputrc
|
||||
|
||||
# set bash preferences and aliases
|
||||
if [[ -f /etc/bash.bashrc.default ]] ; then
|
||||
mv /etc/bash.bashrc.default /etc/bash.bashrc.bak > /dev/null 2>&1
|
||||
fi
|
||||
if [[ ! -f /etc/bash.bashrc.bak ]] ; then
|
||||
cp /etc/bash.bashrc /etc/bash.bashrc.bak > /dev/null 2>&1
|
||||
fi
|
||||
@@ -35,7 +45,7 @@ cp /etc/bash.bashrc.bak /etc/bash.bashrc
|
||||
echo "" >> /etc/bash.bashrc
|
||||
echo "# custom settings and aliases" >> /etc/bash.bashrc
|
||||
echo "set -o noclobber" >> /etc/bash.bashrc
|
||||
echo "alias lsa='ls -alhF'" >> /etc/bash.bashrc
|
||||
echo "alias lsa='ls -alhvF'" >> /etc/bash.bashrc
|
||||
echo "alias systart='sudo systemctl start'" >> /etc/bash.bashrc
|
||||
echo "alias systop='sudo systemctl stop'" >> /etc/bash.bashrc
|
||||
echo "alias sysrest='sudo systemctl restart'" >> /etc/bash.bashrc
|
||||
|
||||
Reference in New Issue
Block a user