How to Create a File on Linux

 Linux  Comments Off on How to Create a File on Linux
Aug 132018
 

As I say often, there are many ways to skin a Linux cat.

Here are a few ways to create a new file on a Linux system.

I have tested the following commands on CentOS 7 and Linux Mint 18.

Creating a New File

1. Touch method

$ touch file_name

Example:

$ touch jennifer

$ ls
Interview-Questions       Favorite-Beer.txt             REdHat-Release-Dates.odt               Ubuntu-Tips
jennifer

2. Echo method

$ echo -n > New_file

Example:

$ echo -n > sammy
$ ls
Desktop  Documents  Downloads  Music  Pictures  Public  sammy  Templates  Videos  VirtualBox VMs

3. Echo method with some content in file

$ echo jack and jill went up the hill > new_file

Example:

$ echo jack and jill went up the hill > donald_trump
$ ls
Desktop  Documents  donald_trump  Downloads  Music  Pictures  Public  sammy  Templates  Videos  VirtualBox VMs
$ ls
Desktop  Documents  donald_trump  Downloads  Music  Pictures  Public  sammy  Templates  Videos  VirtualBox VMs
$ cat donald_trump
jack and jill went up the hill

4. Quickie Method

$ > New_File

$ > Hillary_clinton
$ ls
$        Documents     Downloads        Music     Public  Templates  VirtualBox VMs
Desktop  donald_trump  Hillary_clinton  Pictures  sammy   Videos

5. Via Nano Text Editor

$ nano new_file

Once new_file is opened, hit ctr-o (i.e., the alphabet o and NOT zero).

You can also create a new file via the Vim text editor:

6. Use the Vim Text Editor

$ vi new_file

To save your new_file, hit Esc, then type :wq the file will then be saved and you will exit vim.

 Posted by at 2:36 pm

Linux Mint 19 Won’t Support Minimal Install Option

 Linux  Comments Off on Linux Mint 19 Won’t Support Minimal Install Option
Apr 302018
 
Linux Mint 19 Won't Support Minimal Install Option

The bigwigs at Linux Mint have spoken. The nice minimal install option available in the new Ubuntu 18.04 LTS distro will NOT be offered with the upcoming Linux Mint 19 aka Tara. With Ubuntu 18.04’s minimal install, you only get the Firefox browser and a few basic utilities, not the Read More

 Posted by at 3:03 pm

Ubuntu 18.04 LTS – My First Impressions

 Linux  Comments Off on Ubuntu 18.04 LTS – My First Impressions
Apr 262018
 
Ubuntu 18.04 LTS - My First Impressions

Ubuntu 18.04 LTS aka Bionic Beaver is out today (April 26, 2018) and you can download it here. After downloading it, go to the folder and do a shasum check to ensure your download’s integrity. Here’s how to do the shasum check: $ sha256sum bionic-desktop-amd64.iso adf9c1cbb2529cb06a67bbb16af881d8d918078e7e155a897ac30a9e0cf2bafa bionic-desktop-amd64.iso Since this is Read More

 Posted by at 7:43 pm

How to Check If an Application is Installed in Ubuntu

 Linux  Comments Off on How to Check If an Application is Installed in Ubuntu
Dec 012016
 

In this brief post, I’ll quickly show you how to check via the terminal if a particular program is installed on an Ubuntu Linux system. For easy understanding, I will consider a program that is already installed (keepassx) on my computer and one that is not installed nmap. On the Read More

 Posted by at 10:20 am

Differences between yum info and yumdb info with Example

 Command Line, Linux  Comments Off on Differences between yum info and yumdb info with Example
Apr 262016
 

Wise folks say a picture is worth a thousand words. In Linux, an example is worth ten thousand words. In this post, we’ll use an example to understand the difference between the commands yum info and yumdb info. For purpose of this post, I will use the popular Cherrytree notes Read More

 Posted by at 12:34 pm

How To Add Guest Additions to Lubuntu 16.04

 How To, Linux  Comments Off on How To Add Guest Additions to Lubuntu 16.04
Apr 262016
 

I have Lubuntu running as a virtual machine via VirtualBox. Like many Ubuntu fans, I upgraded to version 16.04 LTS (Xenial Xerus) yesterday. The reason for my upgrade was that Ubuntu 15.10 (a.k.a. Wily Werewolf) was not a Long-term Supported distribution. Support for Ubuntu 15.10 ends in July 2016 while Read More

 Posted by at 10:04 am