If your machine has errors with the hard disk and your machine has booted with a read-only filesystem, these commands can force your machine to either shutdown or reboot. Forced re-boot. echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-triggerecho 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger Forced shutdown. echo 1 > /proc/sys/kernel/sysrq echo o > …

This command will update a single package upon request. This would be very useful if you want to update only a certain package. dpkg -s 2>/dev/null | grep -q Status.*installed && sudo apt-get install I found this tip here: http://askubuntu.com/questions/44122/how-to-upgrade-a-single-package-using-apt-get. This would be very useful to someone using Ubuntu or Debian. Here is an example. …

The ss command for Linux allows a user to list all listening ports on a Linux system. This command lists all listening TCP ports. [email protected] ~ $ ss -l -t State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 1 127.0.0.1:4101 *:* LISTEN 0 50 *:netbios-ssn *:* LISTEN 0 128 *:sunrpc *:* LISTEN 0 128 …

Kali Linux has available to it a Ruby script that may be used to list all users on a WordPress website. Use the command below to scan a website for security vulnerabilties and see if there are any problems with the website. [email protected]:~# wpscan –url mywordpresssite.com –enumerate [email protected]:~# wpscan –url mywordpresssite.com –enumerate user Use this …

The mtr command for Linux is another good way to trace network hops. Use it like this: mtr –report [HOST] [email protected] ~ $ mtr –report yahoo.com Start: Mon Jul 28 07:42:16 2014 HOST: deusexmachina Loss% Snt Last Avg Best Wrst StDev 1.|– 192.168.100.1 0.0% 10 0.3 0.3 0.3 0.4 0.0 2.|– 185.3.148.122.network.m2c 0.0% 10 29.0 …

The cat /var/log/apt/term.log command will allow you to retrieve information about a package installation; you may then review the installation process and see if anything went wrong during the installation process. [email protected] ~ $ cat /var/log/apt/term.log Log started: 2014-07-05 11:29:39 Log ended: 2014-07-05 11:30:38 Log started: 2014-07-05 21:39:55 Selecting previously unselected package ipcalc. (Reading database …

The sftp command allows a user to retrieve files on a remote machine and save them on their computer. Use this command to access the files: sftp -P 443 [email protected]:/home/homer/Downloads/*.pdf I have my SSH server running on port 443, so I need to specify that port when using this command. I am using Cygwin on …

This is how to automatically remove unneeded packages on your Linux Mint system. [email protected]:~$ sudo apt-get autoremove [sudo] password for jason: Reading package lists… Done Building dependency tree Reading state information… Done The following packages will be REMOVED: libglib2.0-0:i386 libgstreamer-plugins-base0.10-0 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0 libgstreamer0.10-0:i386 liborc-0.4-0:i386 libpgm-5.1-0 libpoppler57 libpth20 libsndio6.0 libzmq3 qtdeclarative5-qtfeedback-plugin qtdeclarative5-ubuntu-web-plugin 0 to upgrade, 0 …

The VMware tools are useful extensions for Debian, that allow a Linux distribution to be more usable in the VMware hypervisor. Use this simple command to install them in Debian 7.0. [email protected]:/home/homer# apt-get install [email protected]:/home/homer# apt-get install open-vm-tools-desktop The open-vm-tools-desktop package installs the graphical VMware tools additions that will speed up the desktop and enable …

Using tightvnc to connect to a remote Linux machine is a good way to access a graphical desktop on a remote Linux box. Firstly; install the tightvnc server on the target machine to be accessed. [email protected] ~ $ sudo apt-get install tightvncserver [sudo] password for homer: Reading package lists… Done Building dependency tree Reading state …

Some very useful Linux shell commands and tricks. Print numbers in sequence. [[email protected] ~]$ seq 8 24 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24[[email protected] ~]$ seq 8 24 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 …

Installing Hesk on a Debian Linux server is very easy. This allows you to deploy a simple Linux powered web helpdesk. Download the Hesk software here: http://www.hesk.com/download.php. I downloaded and unpacked the Hesk software tarball and extracted it to the var/www directory. sudo unzip hesk253.zip -d /var/www This was then set to the proper permissions …

I recently bought a TVstick branded USB TV tuner that had the Realtek Rtl2832UDVB chipset inside. Following the instructions on this site: http://jms.id.au/wiki/EzcapDvbAdapter. I was able to get this device working with the 3.2 kernel on Debian Linux 7.1. Firstly; retrieve the source code for the drivers. git clone –depth=1 git://linuxtv.org/media_build.gitgit clone –depth=1 git://linuxtv.org/media_build.git Then …

The git clone command is used to pull the latest code from a GIT repository. But using it through a proxy can be annoying. Here is how to do this. Firstly; define your HTTP proxy information. export HTTP_PROXY="http://Monty.Burns:[email protected]:80"export HTTP_PROXY="http://Monty.Burns:[email protected]:80" Then you need to tell GIT about the proxy. git config –global http.proxy $HTTP_PROXYgit config –global …