1. ดู Port ที่เปิด
netstat -lntu
as replied by @askmish will give you list of services running on your system on tcp and udp ports where
-l
= only services which are listening on some port-n
= show port number, don't try to resolve the service name-t
= tcp ports-u
= udp ports-p
= name of the program
A list of just unique port numbers and only IPv4:
netstat -tuwanp4 | awk '{print $4}' | grep ':' | cut -d ":" -f 2 | sort | uniq
2. ดู Program ที่ติดตั้ง
How to list all installed packages?
To get a list of packages installed locally do this in your terminal:dpkg --get-selections | grep -v deinstall
(The
-v
tag "inverts" grep to return non-matching lines)
To get a list of a specific package installed:
dpkg --get-selections | grep postgres
To save that list to a text file called
packages
on your desktop do this in your terminal:dpkg --get-selections | grep -v deinstall > ~/Desktop/packages
Alternatively, simply use
dpkg -l
-------------------------------
To get just the packages which were expressly installed (not just installed as dependencies), you can run
aptitude search '~i!~M'
This will also include a brief description, which you may want. If not, use the option
-F '%p'
,
-------------------------------
Create a backup of what packages are currently installed:
dpkg --get-selections > list.txt
Then (on another system) restore installations from that list:
dpkg --clear-selections
sudo dpkg --set-selections < list.txt
To get rid of stale packages
sudo apt-get autoremove
To get installed like at backup time (i.e. to install packages set by dpkg --set-selections
)
sudo apt-get dselect-upgrade
To list all packages intentionally installed (not as dependencies) by apt commands, run the following :
( zcat $( ls -tr /var/log/apt/history.log*.gz ) ; cat /var/log/apt/history.log ) | egrep '^(Start-Date:|Commandline:)' | grep -v aptdaemon | egrep '^Commandline:'
This provides a reverse time based view, with older commands listed first:
Commandline: apt-get install k3b
Commandline: apt-get install jhead
Installation data also showing synaptic usage, but without details (the same with installation date) :
( zcat $( ls -tr /var/log/apt/history.log*.gz ) ; \
cat /var/log/apt/history.log ) | egrep '^(Start-Date:|Commandline:)' | grep -v aptdaemon | egrep -B1 '^Commandline:'
providing the following:
Start-Date: 2012-09-23 14:02:14
Commandline: apt-get install gparted
Start-Date: 2012-09-23 15:02:51
Commandline: apt-get install sysstat
-------------------------------apt-mark showmanual
man pages state:
will print a list of manually installed packages
So, it should just give a list of explicitly installed packages (though this includes packages that were part of the default initial install) without all of the dependencies included due to these packages being installed.
3. ติดตั้ง Xampp
Step 1. Open terminal and download XAMPP 1.8.3 package.
Step 2. After that, Change xampp package installer to executable then run to installing with following command:
The window installation wizard will appear.
4. ใช้ apt-get ผ่าน proxy
How to use “apt-get” via “Http-proxy” like this?
/etc/apt/apt.conf
and insert the following line:Acquire::http::Proxy "http://username:password@proxy.server:port/";
5. ใช้ wget ไม่ผ่าน proxy
Wget with or without Proxy
When use url
wget url --proxy=off
6. ติดตั้ง phpmyadmin บน Ubuntu
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-14-047. ติดตั้ง Wordpress บน Ubuntu
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-14-04Sign up here with your email
ConversionConversion EmoticonEmoticon