Show the Top 10 Largest Directories on Linux
March 13, 2024
If you need to see the top 10 largest directories on your Linux system, you can use the following command:
Read More
How to set the Hostname on a Linux server with Terraform
May 22, 2023
If you need to set the hostname on a linux server, and you are using Terraform, then you can do the following:
Read More
How to Change a MariaDB/MySQL Data Directory to a New Location on Linux
March 7, 2023
Step 1 — Moving the MariaDB Data Directory mysql -u root -p select @@datadir; Output: +-----------------+ | @@datadir | +-----------------+ | /var/lib/mysql/ | +-----------------+ 1 row in set (0.
Read More
How to update NTP to sync clock on Linux
January 4, 2023
If you need to sync the clock on Linux using the central NTP clock service, you can do the following:
Read More
Understanding the Network Modes in AWS ECS
September 18, 2022
If using the EC2 launch type, the allowable network mode depends on the underlying EC2 instance’s operating system.
Read More
AppMesh and ECS with Imported ACM certificates on Envoy Sidecar through EFS
September 16, 2022
Summary This guide showcases the ability to use imported certificates from a third party provider (e.
Read More
How to Check if a Volume is Mounted in Bash
August 12, 2022
If you need to check if a volume is mounted in a Bash script, then you can do the following.
Read More
How to Determine if a Bash Variable is Empty
August 11, 2022
If you need to check if a bash variable is empty, or unset, then you can use the following code:
Read More
How to Order by File Size using the du command in Linux
August 10, 2022
If you use the du command to list all the file sizes on Linux:
Read More
How to Resize an AWS EBS Volume in Bash
July 27, 2022
If you need to resize an EBS volume in AWS, you can do so using bash.
Read More
How to Count Files in Directory on Linux
July 20, 2022
If you need to count how many files are in a directory on Linux, then you can use a combination of the ls command to list all the files, and the wc command to count how many lines are printed:
Read More
How to get CPU Frequency in Linux
July 1, 2022
If you need to get the CPU Frequency in Linux, then you can run the following command:
Read More
How to Exit if a Bash Variable in Not Set
June 22, 2022
Sometimes you might want to exit a command if a variable is not set in Bash.
Read More
How to Check OS version and flavor in Linux
June 17, 2022
If you need to check the version and flavour of the running Linux instance, then you can try the below commands:
Read More
How to Save sed Output Directly to a File
May 8, 2022
You have 3 options here: Option 1: use tee with sed sed 's/Hello/Hi/g' file-name | tee file Option 2: use > with sed sed 's/Hello/Hi/g' file-name > file Option 3: use sed with -i option sed -i 's/Hello/Hi/g' file-name
Read More
How to Bulk Move All Email from One Account to Another using the CLI
April 8, 2022
If you find yourself in a position where you need to sync all emails from one account to another, then you can use the imapsync command-line tool to bulk copy, or move everything for you.
Read More
How to Install AWS CLI on Linux
April 7, 2022
You can download and install the AWS CLI on Linux as follows:
Read More
How to Reboot Networking on Mac from CLI
April 6, 2022
If you need to reboot, or restart the networking interface on your Mac, by using the CLI, then you can issue the following commands:
Read More
[Solved] ZipArchive extension: disabled/not installed on Ubuntu
March 26, 2022
If you have come across the following error: ZipArchive extension:&nbsp;<strong>disabled/not installed</strong>
Read More
How to Change the Timestamp of a File on Mac/Linux
February 17, 2022
If you have a file on your machine, and you want to change the created/modified time/date stamp, then you can use the touch command.
Read More
How to get Meta-Data information from an AWS EC2 Instance
February 4, 2022
If you need to query meta-data information from your running EC2 instance, you can curl the following location:
Read More
How to List all Running Services on Ubuntu
January 3, 2022
If you need to view a list of all the services that are either running or stopped (or both) on an Ubuntu server, then you can use the following command:
Read More
How to Upgrade an Ubuntu Server
January 1, 2022
Upgrading an Ubuntu Server is quite easy, just follow the below commands:
Read More
How to Generate a Random AlphNumeric String in Linux/MacOS
November 11, 2021
If you need to generate a random AlphaNumeric string from the Linux/MacOS Command-Line, then you can use the following script:
Read More
[Solved] ERROR 1030 (HY000): Got error 168 from storage engine
September 8, 2021
If you are getting the following error in MySQL: ERROR 1030 (HY000): Got error 168 from storage engine
Read More
How to Change the Hostname on Linux
July 2, 2021
On Linux, you can change the hostname by using the hostnamectl command.
Read More
How to setup Certbot wildcard certificate on Apache
May 19, 2021
Certbot allows simple, quick and free provisioning of SSL certificates using LetsEncrypt.
Read More
How to tell what the CHMOD value of a file/directory is
November 21, 2020
chmod alters the permissions for a file or directory, you could allow full read/write access to a file or directory by running the following command:
Read More
How to cleanup a /var/log/journal in Linux
November 19, 2020
You may find your /var/log/journal directory taking up a lot of disk-space.
Read More
How to find all files in a directory with extension
August 30, 2020
I needed to find all files in a directory on Linux that ended with the file extension .
Read More
Forensic Analysis on Linux (Unix)
May 29, 2020
Operating Systems come in a few competing choices, of which the major players are Apple’s MacOS, Microsoft’s Windows and then the various flavours of Linux, of which most are open-sourced while the remainder are proprietary to their vendors.
Read More
Get the total size of all the files in a directory
May 23, 2020
It’s amazing how many times I’ve need to find out the total size of all the files in a directory on one of our servers.
Read More
How to debug an Apache 404 error
April 3, 2020
So you are getting an error 404 or perhaps even worse, a 500!
Read More
How to Change the Timezone on Ubuntu Server
March 20, 2020
If you’ve ever typed date into your Ubuntu Server and seen a different time or timezone appear than you expected, then it probably means that this tutorial is for you.
Read More
Remove Special Characters in a String using Bash
March 8, 2020
Programming languages provide the ability to remove special characters from a string quite easily.
Read More
How to Follow Redirects with cURL for CLI or PHP
March 1, 2020
Let’s take a really common example. Say we want to follow redirects with cURL for google.
Read More
How to use Docker to test any Linux distribution locally
February 25, 2020
I often need to test a specific Linux binary or make sure something works as expected from yum install or apt install.
Read More
How to monitor Network Traffic on Linux
February 12, 2020
There is a fantastic tool to see and monitor Bandwidth and Network Traffic on Linux.
Read More
How to use Screen on Linux
February 9, 2020
Screen on Linux is a popular command-line program that lets you multiplex between interactive shells.
Read More
Just SSH to my Jump Box!
September 26, 2018
I am a professional software engineer and do an absolute ton of devops work as well.
Read More
Speedtest on Ubuntu Server (commandline)
February 19, 2014
Using the speedtest-cli is easy and very useful. You run it as follows:
Read More
Windows 7 is better than Ubuntu 12.04 on desktop!
June 28, 2012
Today we have finalised for ourselves that Windows 7 is definitely a “better” operating system than Ubuntu 12.
Read More
How to Comment out a line in a Crontab on Linux
May 3, 2012
Firstly let’s just note that crontabs are read in the following way:
Read More
Sudo install OpenGL & SDL on Ubuntu
February 22, 2010
A quick and easy way would be to type the following in one line with single spaces in the Terminal.
Read More
Cube Desktop on Ubuntu
October 20, 2009
Alright, so I run Ubuntu 7.10 and use the Desktop Effects via compviz, anyhow, I could get the 2d workspace but really wanted the 3d cube, even if I set up 4 desktops, it would still only show 2 sides of the cube(aka not a cube).
Read More