1、linux中常见命令:
解压压缩包:
.tar格式:tar -zxvf hello.tar
.zip格式:unzip hello.zip
unzip -o hello.zip(强制解压)
打包文件夹:
.tar格式:tar -zcvf hello.tar hello
.zip格式:zip -r update.zip opt/ config.ini
复制有链接属性的文件:cp -d so /usr/lib
创建文件夹:mkdir hello
创建文件:touch hello.cpp
搜索文件:locate opencv_highgui.so
查看Linux中磁盘使用情况:df -h
查看main可执行文件运行需要的链接库:ldd main
linux命令行立即关机:shutdown -r now
linux命令立即重启:reboot
2、ubuntu同步网络时间:
(1)安装ntpdate工具
sudo apt-get install ntpdate
(2)将系统时间和网络时间同步:ntpdate cn.pool.ntp.org
ntpdate cn.pool.ntp.org
(3)将时间写入硬件:hwclock --systohc
hwclock --systohc
3、ubuntu中卸载软件
(1)打开一个终端,输入命令dpkg --list查看系统中安装的所有app;
(2)使用命令行 sudo apt-get --purge remove包名来卸载app即可;