针对经常使用到的Linux命令linux常用命令linux常用命令,汇总一下,以备查看:
一、安装类:
1、GIT
sudo apt install git
sudo apt-get install git-core
2、Bazel
方法1:(下载最新版本)
sudo apt-get install curl
sudo echo "deb http://php53.dotdeb.org stable all" >> /etc/apt/sources.list 。echo "deb deb/" | sudo tee -a /etc/apt/sources.list。sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'。
curl | sudo apt-key add -
sudo apt-get update
sudo apt-get install bazel
sudo apt-get upgrade bazel
方法2:(下载指定版本)
下载地址:
下载版本如:bazel-0.25.2-installer-linux-x86_64.sh
chmod +xbazel-0.25.2-installer-linux-x86_64.sh
./bazel-0.25.2-installer-linux-x86_64.sh--user :--user标志将Bazel安装到$HOME/bin目录,并设置.bazelrc路径$HOME/.bazelrc
方法3:源码编译
git clone
cd bazel
./compile.sh
卸载:bazel的卸载比较麻烦:
ll .bazel
sudo rm -rf .bazel/bin
sudo rm -rf .bazel
sudo rm -rf /usr/local/bazel (如果有该目录)
sudo rm -rf /usr/bin/bazel(如果有该目录)
sudo rm -rf /usr/lib/bazel(如果有该目录)
注意:卸载完一个版本再安装新版本前一定要记得重启一下。
3、JDK8
sudo apt-get install openjdk-8-jdk
4、GCC
删除指定版本:
sudo apt-get remove gcc gcc-xx
安装:
sudo apt-get install -y gcc-4.8 sudo apt-get install -y g++-4.8
sudo apt install gcc-4.8 gcc-4.8-multilib g++-4.8 g++-4.8-multilib (for 4.8)
sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev。sudo apt-get install libstdc++5:i386sudo apt-get install libgtk2.0-0:i386sudo apt-get install libpangoxft-1.0:i386 sudo apt-get install ibpangox-1.0-0:i386sudo apt-get install libsm6:i386sudo apt-get install gtk2-engines-murrine:i386sudo apt-get install gtk2-engines-pixbuf:i386sudo apt-get install dos2unix。sudo apt-get install subversion pkg-config python perl g++ g++-multilib bison flex gperf libnss3-dev libgtk2.0-dev libnspr4-0d libasound2-dev libnspr4-dev msttcorefonts libgconf2-dev libcairo2-dev libdbus-1-dev wdiff lighttpd php5-cgi sun-java6-fonts git-core。