nknu.net

Bash shortcuts cheatsheet

Moving around Shortcut Action Alt + b Move cursor to previous word Alt + f Move cursor to next word Ctrl + b Move back a char Ctrl + f Move forward a char Ctrl + a Jump to the start of the line Ctrl + e Jump to the end of the line Deleting, copying, completing, transforming, … Shortcut Action Alt + .

Read More »


Fix virtualbox Linux guest boot blackscreen after kernel upgrade

I run a fedora 24 as a Virtualbox VM on a windows host. The other day, after a kernel upgrade of this VM and rebooting, I got a black screen. Here is what I did to fix it : Reboot your VM and select a previous kernel with grub’s menu. If you don’t have one available, I guess you’ll have to boot in recovery mode and install one. Login as root Execute rcvboxadd cleanup - it will delete your currently installed guest additions Reboot on new kernel (should boot now, but guest additions KO), and login as root Install kernel-headers and kernel-devel of your current kernel version Mount VBox Guest Additions ISO, and execute VBoxLinuxAdditions.

Read More »


How to easily scale your Jenkins cluster with Docker Compose

Jenkins is a wonderful tool. Its original purpose was to do continuous integration of code, but now it has grown into something that can automate and orchestrate almost everything. With more and more tasks handled by Jenkins, the need to allocate more resources for it arise. Luckily, Jenkins can work with remote agents (formerly called slaves), to move the load of builds on other hosts. Its pretty easy to add an agent to Jenkins, and there are plenty of guides out there explaining how to do it.

Read More »


How to mount your android phone on fedora 23 using simple-mtpfs

On recent Fedora versions, it should works out of the box: you plug the phone, the system detects it and opens a file explorer allowing you to browse your device’s content. However, if for some reason you want to mount the phone using simple-mtpfs, you can proceed as follow. Install simple-mtpfs $ dnf install simple-mtpfs Note : you also need the packages fuse fuse-libs libmtp, but chances are that they are already installed on your system.

Read More »


How to configure Docker on Ubuntu 15.04 (workaround)

Article updated the 17th of August 2015, with the remarks of Giacomo Orlandi in the comments, who provided a cleaner way to update the systemd config, based on a discussion in this Docker’s Github issue. If you upgraded (or fresh-installed) your box to Ubuntu 15.04, you may have noticed that the Docker daemon is not using the configuration defined in /etc/default/docker anymore. That is due to the fact that Ubuntu is now using systemd instead of Upstart/SysV.

Read More »


How to easily deploy your ghost blog using docker-machine and docker-compose

Prepare your docker host (with docker-machine) First step is to have a docker-ready server. We have several ways of doing that: we can install docker on our server by hand (from packages, from source, using docker.io neat curl|sh, …), we can use boot2docker, or we can user docker machine to directly provision a server for us. We’ll do the later as it’s reeeaallly easy, with Virtualbox as provider. You’ll need to have Virtualbox installed on your machine.

Read More »


Proxy configuration for Docker on CentOS 7

We saw earlier how to configure the proxy for docker on Ubuntu 14.04, let’s now see how to do that on CentOS 7. Edit /etc/sysconfig/docker and add the following lines: HTTP_PROXY='http://user:password@proxy-host:proxy-port' HTTPS_PROXY='http://user:password@proxy-host:proxy-port' For those settings to be taken into account, you’ll need to restart your docker daemon: # systemctl restart docker You may still need to declare the proxy in the Dockerfile too, as seen in the Ubuntu article.

Read More »


Running docker behind a proxy on Ubuntu 14.04

If you’re behind a proxy, chances are that docker is failing to build your containers, as it is not able to pull base images, and commands in the Dockerfile that need to access the internet are failing. Let’s see how to fix that. Edit /etc/defaults/docker.io and add the following lines: export http_proxy='http://user:password@proxy-host:proxy-port' For those settings to be taken into account, you’ll have to restart your docker daemon: $ sudo service docker.

Read More »


Ubuntu 14.04: How to open ssh:// links in a terminal

If you’re using a web based tool to manage your servers, chances are that this tool is providing ssh:// links to connect directly to those server with one click from your web browser. Let’s see how to setup Ubuntu 14.04 so it can handle this type of link. First we need a script which is able to process a string like “ssh://user@host:port”. Create a file named ssh-handler.sh somewhere in your home directory (ie.

Read More »


Fixing 'screen256-color: unknown terminal type' when ssh'ing within tmux

When SSH’ing to old boxes within tmux, I sometimes get the following error: 'screen-256color': unknown terminal type, and a very ugly prompt. An easy way to fix this is to set a different value for the default-terminal setting in your tmux.conf. You only have to open your ~/.tmux.conf and add the following line: set -g default-terminal "xterm" However, note that this will affect all your sessions. If you don’t want to redefine your default-terminal value, you can fix this only when needed by setting a different value for the TERM variable when you ssh to those boxes.

Read More »


Adrien Anceau
Geek, gamer, photography enthusiast, passionate about technology, automation and food.
Back to Top