Following a tutorial where you’re supposed to add a repository with apt-add-repository but the command isn’t found? You can install it by doing the following: sudo apt-get install software-properties-common python-software-properties Then re-run the apt-add-repository command and it should work!
Running nginx (or lighttpd, or any other web server) but still want to make use of Apache’s useful ab (apachebench) benchmarking tool? apt-get install apache2-utils …should do it.
Shellshock is quite a serious security hole found a couple of days ago in Bash; to check whether your Ubuntu server is vulnerable run the following in a terminal: env VAR='() { :;}; echo Shellshock vulnerable!‘ bash -c “echo Bash Testing” If your system is vulnerable, you will see: Shellshock vulnerable! Bash…
If you have a lot of virtual (or real) machines running Debian or Ubuntu and a limited internet connection, it can make a lot of sense to use apt-cacher-ng to create a local cache of the packages you use so that they are only downloaded once. The current version of apt-cacher-ng can also help…
To find out information about the CPU used in the system, we can use the following command: lscpu This gives us useful information about the CPU, such as the number of physical cores, virtual threads, virtualization support and more. An example output from a Haswell Xeon system looks like: Architecture: x86_64…
To list the available hard drives (to be specific, available block devices) we use the following command: lsblk This will provide output in the following format: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 8G 0 disk ├─xvda1 202:1 0 7G 0 part / ├─xvda2 202:2 0 1K 0 part…
Sometimes you may want to check the output of dmesg from a previous session. This can provide some useful information – for example, whether an error has only just started appearing or whether it was present during previous sessions. Ubuntu archives old dmesg outputs in the following location: /var/log We can see…
One thing you may have noticed when using the z switch with tar is that the compression can take some time! If you look at your CPU usage, though, you’ll notice that only one core is being utilised to compress the files. In a modern system 4 or 8 cores are common, meaning that…
Following on from the article on writing files to a tape backup, what happens if you want to back up more than what fits on a single tape? Here we want to use the –multi-volume switch, or -M. Use it so: tar -cvMf /dev/[path-to-tape] [backup folder or files] As a working example:…
A customer upgraded from 13.04 to 13.10 and their internal wiki was broken afterwards; for a simple Apache install where the wiki was installed at the web root and all access was via the LAN (thus they were happy with not restricting the access), the fix was to add: <Location /> Require all…