Ubuntu 命令的技巧1.docVIP

  • 2
  • 0
  • 约1.06万字
  • 约 20页
  • 2018-06-03 发布于福建
  • 举报
Ubuntu 命令的技巧1

转载 Ubuntu 命令技巧1 原文地址:Ubuntu命令技巧1作者:李素校下面的命令大都需要在控制台/终端/shell下输入。 控制台,终端,和shell意味着同样一件事-一个命令行界面,他可以用来控制系统。 打开一个控制台: 应用程序--附件--终端 任何一个使用sudo作为前缀的命令都需要拥有管理员(或root)访问权限。所以你会被提示输入你自己的密码。 安装升级 查看软件xxx安装内容 dpkg-L xxx 查找软件库中的软件 apt-cache search正则表达式或aptitude search软件包 显示系统安装包的统计信息 apt-cache stats 显示系统全部可用包的名称 apt-cache pkgnames 显示包的信息 apt-cache show k3b 查找文件属于哪个包 apt-file search filename 查看已经安装了哪些包 dpkg-l 查询软件xxx依赖哪些包 apt-cache depends xxx 查询软件xxx被哪些包依赖 apt-cache rdepends xxx 增加一个光盘源 sudo apt-cdrom add 系统更新 sudo apt-get update(这一步更新包列表)sudo apt-get dist-upgrade(这一步安装所有可用更新)或者sudo apt-get upgrade(这一步安装应用程序更新,不安装新内核等) 清除所有已删除包的残馀配置文件 dpkg-l|grep^rc|awk{print}|sudo xargs dpkg-P如果报如下错误,证明你的系统中没有残留配置文件了,无须担心。 dpkg:--purge needs at least one package name argument Type dpkg--help for help about installing and deinstalling packages[*]; Use`dselector`aptitudefor user-friendly package management; Type dpkg-Dhelp for alist of dpkg debug flag values; Type dpkg--force-help for alist of forcing options; Type dpkg-deb--help for help about manipulating*.deb files; Type dpkg--license for copyright license and lack of warranty(GNU GPL)[*]. Options marked[*]produce alot of output-pipe it through`lessor`more! 编译时缺少h文件的自动处理 sudo auto-apt run./configure 查看安装软件时下载包的临时存放目录 ls/var/cache/apt/archives 备份当前系统安装的所有包的列表 dpkg--get-selections|grep-v deinstall~/somefile 从上面备份的安装包的列表文件恢复所有包 dpkg--set-selections~/somefile sudo dselect 清理旧版本的软件缓存 sudo apt-get autoclean 清理所有软件缓存 sudo apt-get clean 删除系统不再使用的孤立软件 sudo apt-get autoremove 查看包在服务器上面的地址 apt-get-qq--print-uris install ssh|cut-d-f2 彻底删除Gnome apt-get--purge remove liborbit2 彻底删除KDE apt-get--purge remove libqt3-mt libqtcore4 一键安装LAMP服务 sudo tasksel install lamp-server 删除旧内核 sudo aptitude purge~ilinux-image-.*(!`uname-r`) 导入ppa源的key值 #W:GPG签名验证错误:jaunty Release:由于没有公钥,下列签名无法进行验证:NO_PUBKEY 5126890 CDCC7AFE0 sudo apt-key adv--recv-keys--keyserver 5126890 CDCC7AFE0#5126890 CDCC7AFE0替换为你需要导入的Key值 增加一个ppa源 sudo add-apt-repository ppa:user/ppa-name#使用ppa的地址替换

文档评论(0)

1亿VIP精品文档

相关文档