1.find the install path of some software
like python:
or the start path:
or want to display some system environment variable
2.manage .deb package in ubuntu
install a source package :
If
dpkg
reports an error due to dependency problems, you can run
sudo apt-get install -f
to download the missing dependencies and configure everything.
To remove a Debian (Ubuntu) package (.deb):
To Reconfigure/Repair an installed Debian (Ubuntu) package (.deb):
for detial U can visit: http://askubuntu.com/questions/40779/how-do-i-install-a-deb-file-via-the-command-line
3.some package command
<1> zip
我们可以使用下列的命令压缩一个目录:
<2> tar
打包一个目录:
<3> tar.gz
压缩一个目录:
<4> tar.bz2
like python:
点击(此处)折叠或打开
- dpkg -L python
点击(此处)折叠或打开
- which python
- /usr/bin/python
点击(此处)折叠或打开
- warrior@warrior:~$ echo $PATH
- /usr/local/sbin:/usr/local/bin:
2.manage .deb package in ubuntu
install a source package :
点击(此处)折叠或打开
- warrior@warrior:~/Downloads$ sudo dpkg -i xpdf_3.03-16+experimental2_amd64.deb
- [sudo] password for warrior:
- Selecting previously unselected package xpdf.
- (Reading database ... 285114 files and directories currently installed.)
- Preparing to unpack xpdf_3.03-16+experimental2_amd64.deb ...
- Unpacking xpdf (3.03-16+experimental2) ...
- Setting up xpdf (3.03-16+experimental2) ...
- Processing triggers for mime-support (3.54ubuntu1.1) ...
- Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
- Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
- Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
- Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
- Rebuilding /usr/share/applications/bamf-2.index...
To remove a Debian (Ubuntu) package (.deb):
点击(此处)折叠或打开
- sudo dpkg -r packagename
点击(此处)折叠或打开
- sudo dpkg-reconfigure packagename
3.some package command
<1> zip
我们可以使用下列的命令压缩一个目录:
点击(此处)折叠或打开
- zip -r archive_name.zip directory_to_compress
下面是如果解压一个zip文档:
点击(此处)折叠或打开
- unzip archive_name.zip
打包一个目录:
点击(此处)折叠或打开
- tar -cvf archive_name.tar directory_to_compress
解包:
点击(此处)折叠或打开
- tar -xvf archive_name.tar.gz
也可以用这个命令来设置解包的路径:
点击(此处)折叠或打开
- tar -xvf archive_name.tar -C /tmp/extract_here/
压缩一个目录:
点击(此处)折叠或打开
- tar -zcvf archive_name.tar.gz directory_to_compress
解压缩:
点击(此处)折叠或打开
- tar -zxvf archive_name.tar.gz
使用tar.bz2进行压缩。
点击(此处)折叠或打开
- tar -jcvf archive_name.tar.bz2 directory_to_compress
解包命令:
点击(此处)折叠或打开
- tar -jxvf archive_name.tar.bz2