Pages with tag Ubuntu

Block remote root login via ssh on Ubuntu/etc to keep your server safe A moment ago I was checking the system logs on my Ubuntu server and found that in auth.log reports that someone was repeatedly trying to SSH login as root. The "root" entry in /etc/passwd is setup so that no password will ever be matched, so perhaps this potential cracker would never get into my server anyway. But the requests are using bandwidth - and what if they were able to figure out a password that would work? Why not just block remote SSH login access to logging in as root in the first place? It's a bad idea to login directly as root - instead the recommended best practice is to login as a regular user then use sudo to perform things requiring super user access.
Fixing Ubuntu gnome-terminal app to allow copy/paste

Ubuntu is supposed to be an easy-to-use Linux distribution where everything just works. If so, why doesn't copy/paste work with the default terminal program? It's quite common to copy/paste text and other data between applications. Speaking for myself, I am frequently writing tech tutorials like this one, and therefore must frequently copy text from a terminal session, or into a terminal session, to write the tutorial. Using gnome-terminal, the default terminal app on Ubuntu, it's a frustrating experience because copy/paste does not work fluidly with gnome-terminal on Ubuntu. Further, the fix is unsatisfying and incomplete.

Fixing Ubuntu to allow running gparted to format/configure disks

Ubuntu is supposed to be a well-tested easy-to-use Linux, so when I wanted to run gparted to format a new drive it was frustrating I had to jump so many hoops to launch the program. Fixing the problem of launching gparted on Ubuntu turned out to be easy, but difficult to first determine what went wrong and the fix.

How to enable passwordless SSH login on Ubuntu 20.04 that's inside Multipass Multipass is an excellent tool for running Ubuntu on macOS or Windows laptops. Out of the box it does not enable passwordless SSH access to the Ubuntu instance, and instead you use the multipass shell command. Sometimes you need passwordless SSH access, however.
How to format a drive on Ubuntu with the XFS file system and reflinks support Reflinks are an extremely interesting feature - it is an implementation of "Copy on Write" for files in the file system. You create a reflink using the command cp --reflink=always, and the two files act as if they're linked together (no extra disk space consumed) but as soon as you edit one they become two files. With reflinks one could easily set up a clone of a directory structure to edit something in the clone without modifying the original files. XFS is one of the file systems which supports reflinks, so it is worthwhile to know how to format a drive with the XFS filesystem and with the reflinks feature enabled.
How to set up remote desktop on Ubuntu, access it from macOS Need to use a distant Ubuntu computer from your Mac laptop or desktop? I have an Intel NUC in my office providing some lightweight services - a Gogs-based Git server, and a Jenkins instance - and, while I hardly ever use its desktop environment it is useful to occasionally do so. Using Apple's Screen Sharing feature is excellent, when used between Mac's. But with Ubuntu two issues crop up, one being the relative difficulty getting it set up on Ubuntu and the other being the inscrutable error message macOS gives when you attempt to access the Ubuntu desktop.
How to set-up a multi-drive SSD/HDD Ubuntu desktop system

Ubuntu is supposed to be fairly simple to use with lots of attention put on a solid/reliable well-thought-out Linux user experience. My experience setting up a multi-drive Ubuntu computer showed it's not quite as smooth a user experience as the Ubuntu reputation would lead you to believe.

Installing Skype, photo/video editing, word processors, and more on a Chromebook Chromebooks offer respite from antivirus software hassles, system maintenance hassles, and more. The idea is that with the Chrome web browser as the only user interface, people can compute in safety. But what about the whole slew of existing software that runs outside web browsers - Skype being just one example. What about video or audio editing? What about traditional word processors or spreadsheet applications? None of those run inside a web browser. Yet. For a long period of time the only way to install Skype involved installing Crouton, the add-on supporting Linux software as described below. Since this was originally posted in Feb 2014, Microsoft released an official Skype for Chromebooks. However, Crouton is still useful because of the need for other software such as Gimp, for image manipulation.
Installing some native-code npm packages on Ubuntu 20.04 fails on not finding python command Node.js 14.x was just released, as was Ubuntu 20.04. Testing my application on that combination failed because native code npm packages fail because python is not found. WTF? I followed the instructions and installed build-essential which supposedly brings in every compiler tool we would need. But ... fortunately there is a simple solution.
Mounting APFS file systems on Ubuntu 22.04 The Linux ecosystem includes filesystem support for disks from many operating sytems. Apples APFS is very nice with powerful features. Setting up APFS support on Linux/Ubuntu is tricky, however.
Moving /home on Ubuntu to a second drive

It's common to mount the entire Ubuntu system on one partition on one drive. It's very easy to set that up, simply format an ext4 filesystem for the entire disk, and away we go. How do you transition such a system to have /home on a second drive? The GUI tools don't support doing this, so what do you do? A big consideration is that while logged in you're using /home, and therefore can't delete that filesystem while it's in use.

Successfully mounting Drobo shares from a Chromebook with Crouton w/ Ubuntu 14.04 installed The last couple weeks I've switched my working environment from a MacBook Pro to a Chromebook that has Ubuntu installed under Crouton. A lot of my work is developing Node.js software, and writing website content, and my habits are to live at the command line typing commands. But it also means accessing the large amount of content I have stashed on the MacBook Pro, and a Drobo 5N. MacOSX can easily mount shares on the Drobo, letting me access those files as if they were on the local machine. By default Chromebooks cannot do this, meaning the Chrome browser side of my Chromebook cannot (at this time) access anything stored on the Drobo. Because Ubuntu is installed (via Crouton), that side of the Chromebook theoretically can mount shares on the Drobo, but I ran into problems trying to directly mount the SMB share using Ubuntu 14.04 tools. Fortunately I've developed an alternate method that's nearly as good and quite easy to implement.
Troubleshooting Canonical's Multipass on Windows 10 Pro Multipass is an excellent tool for running Ubuntu instances on a host system. Builds are available for Linux, macOS and Windows, and it is claimed to work well on all three. In my case, I spent three days solid trying to launch an Ubuntu instance and nearly gave up in frustration. But I found a simple problem, with a simple solution, and along the way learned about Hyper-V, WSL2, and other deep stuff about Windows.
Use Canonical's Multipass to display Linux GUI applications on macOS desktop Sometimes we need to run a Linux GUI application but do not have a graphics display on that computer. The X11 protocol lets us display the application remotely, and Canonical's Multipass application lets us manage Ubuntu instances in a lightweight virtual machine on Mac OS X or on Windows. Maybe we have a Linux GUI app that hasn't been ported to Mac OS X, we can run it inside a virtual Ubuntu instance and with XQuartz display it on the Mac desktop.
Use Canonical's Multipass to display Linux desktop on macOS desktop and VNC Even though macOS has an excellent command-line environment, we sometimes need to run a real Linux system. Multipass is an excellent way to run Ubuntu on macOS (or Windows, for that matter) but it doesn't easily support running a Linux desktop. In this article we demonstrating setting up a VNC server on a Multipass Ubuntu instance, and displaying it on the macOS desktop using a VNC viewer. The same techniques should work on Windows, and even with a remote Ubuntu VPS on a cloud hosting provider.
Why do we need Skype et al on Chromebook - should Google do everything for us? Yesterday we wrote how to install Skype and other desktop software on ChromeOS devices, using Crouton. Today we ponder 'Why?'. Google intends the ChromeOS environment to provide a huge portion of our needs, but we went to a lot of trouble to install Crouton. Are we nuts? No, there are valid ideas going on here.