This is a common command I use backtrack and wiki. I hope it will be useful to my brothers. I have worked hard to study technology day and night in the forum. Please pay attention to your health and take care of yourself !!!
Basic
Passwd: change the password.
Mount local partitions:
Mount/dev/hda1/mnt/hda1 mount.
Ls-l/mnt/hda1 displays the Directory and file of the partition.
Mount windows Network Sharing:
Share <user> <targetIP> <remote share> -- enter the password to mount the share file.
Ls-l/mnt/share/display content.
Umount/mnt/share uninstall sharing
Edit file:
Nano file. sh to create a file.
Ctrl + x exit.
Y.
Enter write changes.
Chmod 755 file changes the file Permission.
./File. sh run the script
Compile c program:
Gcc-o filename file. c compile c code.
./Filename run c program.
Install software by source code:
Tar zxvf program.tar.gz unzip (bz file is jxvf parameter)
Cd program: Enter the decompressed directory.
./Configure makefile.
Make compilation.
Make install installation.
Graphics card not supported (vmware)
Fix-vesa uses the default graphics card configuration.
Dpkg-reconfigure xserver-xorg reconfigure the x server.
Fix-vesa-vmware uses the vmware graphics card driver.
Switch the graphical interface:
Select a tool for the dragon graphic interface.
Desktop fiuxbox uses fiuxbox desktop.
Quit exits.
Network
Dynamic IP:
Ifconfig eth0 up open the NIC.
Dhclient [eth0] dhcp to a new ip address.
Static IP:
Ifconfig eth0 192.168.0.100/24 sets the static IP address.
Route add default gw 192.168.0.1 sets the gateway.
Echo nameserver 192.168.0.1>/etc/resolv. conf to set dns.
/Etc/network/interfaces static IP configuration.
Auto eth0
Iface eth0 inet static
Address 192.168.1.112
Netmask 255.255.255.0
Network 192.168.1.0
Broadcast 192.168.1.255
Gateway 192.168.1.1
Automatically Start the network upon startup:
Update-rc.d networking ults
/Etc/init. d/networking restart
Wireless
/Etc/init. d/wicd start wireless GUI tool
Interface startup: KDE> Internet> Wicd Network Manager
Update-rc.d wicd defaults set boot up
Service
Apache service:
Apachectl start open service (port 80)
Apachectl stop disables the service.
Ssh service:
Sshd-generate create public key private key (required for the first time)
/Etc/init. d/ssh start to open the Service (port 22)
/Etc/init. d/ssh stop to close the service.
Ssh user @ targetIP connects to the ssh server.
Update-rc.d-f ssh defaults set boot up.
Tftp service:
Atftpd -- daemon -- port 69/tmp/Open tftp (port 69)
Pkill tftpd to disable the service.
Vnc service:
Vncserver open service (5901)
Pkill Xvnc to close the service.
Check port listening:
Netstat-ant displays the tcp listening port.
Netstat-anu displays the udp listening port.
Netstat-ant | grep 22 shows the ssh status.
Netstat-anu | grep 69 displays the status of tftp.
Help
Man command
Info command
Command -- help
Command --- h
Software installation:
Apt command
The apt-get install software name downloads all dependencies and installs them.
Apt-get remove [-- purge] The software name removes the software package. -- Purge indicates to clear the package.
Apt-get update updates the package directory of the installation source.
Apt-get upgrade: upgrade all software packages installed.
Apt-get dist-upgrade [-u] and the above imagination need to solve the dependency.
Summary of the apt-cache search software package.
The apt-cache show software displays the complete description of installed software packages.
The apt-cache showpkg software displays the detailed information and dependency of the software package.
More use of man apt to query apt commands.
Dpkg command
Dpkg-I software. deb install a downloaded software package.
Dpkg-c software. deb lists the deb file information.
Deb package information extracted by dpkg-I software. deb.
Dpkg-r Software. deb remove an installed software package.
Dpkg-P software. deb completely clears an installed software package (including configuration)
Dpkg-L software. deb flows out of the installed software package.
The dpkg-s software. deb information shows the installed software packages.
Dpkg-reconfigure software. deb reconfigure the installed software package.
Run man dpkg to query more dpkg commands.
Upgrade the kernel to bt4r2:
Apt-get install linux-source
Cd/usr/src/
Tar jxpf linux-source-2.6.35.8.tar.bz2
Rm linux
Ln-s linux-source-2.6.35.8 linux
Cd linux
Cp/boot/config-2.6.35.8. config
Make scripts & make prepare
Ln-s/usr/src/linux/lib/modules/2.6.35.8/build
Apt-get clean
Cd/root/
From acmfly's blog