服务器bashrc备份

# ~/.bashrc: executed by bash(1) for non-login shells.

# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
#~/.by
# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval "$(dircolors)"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
function pid(){
      ps -ef | grep '' | awk '{print $2}'
  }  
alias fw='service --status-all | grep +'
alias vf='v /etc/systemd/system/test.service'
alias cq='sudo reboot'
alias h='htop'
alias ss='ss -antpl | grep 5432'
alias pd='ps -aux'                    
alias pdd='ps -aux | grep'            
alias p='python3'
alias s='source .bashrc'
alias r='rm -R'
alias nid='netstat -ntlp|grep'
alias mk='mkdir'
alias see='less'
alias se='head -n -0'
#lsblk查看磁盘分区
alias lll='lsblk -f'
alias df='df -hl'
alias cl='clear'
alias cmd='compgen -a'
alias cp='cp -r'
alias w='whereis'
alias fd='find / -name'
alias mip="ifconfig -a"
alias mipp="ip address show"
alias hs="hostname -i"
alias rd="readlink -f"
alias 23='2to3 -w'
alias al='apt list'
alias ai='apt install -y' 
alias au='apt update'
alias aup='apt upgrade'
alias pi='pip install'
alias pif='pip freeze'
alias ll='ls -alF'
alias l='ls -A'
alias v='vim'
alias c7='chmod 777 -R'
alias c0='chmod 700 -R'
alias c3='chmod 327 -R'
alias cmdd='man'
alias vb='vim .bashrc'
alias svb='head -n -0 /root/.bashrc'
alias p='python3'
function rem(){                                 apt remove -y $1
      apt purge  -y $1
      apt auto remove -y $1
} 
function c (){
  x="$1"
  y="${x%.*}"
  clang++ -o "$y" "$x" && ./$y
}                                          
function j (){
      x="$1"
      y="${x%.*}"
      javac "$x" 
      java "$y"
     }
function vs()
     {
       if "$1" --version
       then
       echo 
       elif "$1" -version
       then
       echo 
       elif "$1" version
       then
       echo 
       elif "$1" -v
       then
       echo 
       fi
       }
function hl()
     {
       if "$1" --help
       then
       echo
       elif "$1" -help
       then
       echo
       elif "$1" help
       then
       echo
       fi
       }


sudo service lightdm stop
sudo service postgresql stop
sudo service apache2 stop
sudo service mariadb stop
function sta(){                                 #apt install -y systemd
#vim /etc/systemd/system/test.service           #[Unit]
#Description=My test service                    #After=multi-user.target
#[Service]
#Type=simple                                    #Restart=always
#ExecStart=/usr/bin/python3 /home/<username>/test.py
#[Install]
#WantedBy=multi-user.target
                                                sudo systemctl daemon-reload
sudo systemctl enable test.service
sudo systemctl start test.service
sudo systemctl restart test.service

}
function sto(){                                 #sudo systemctl stop test.service
}

function lk(){

 ls -A |grep .$1
 ls -A *.$1

}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值