7 Extremely Useful Linux Commands for Beginners

#1: ls : What’s in this directory?

The command ls stands for list directory contents. And, cleverly, it will do just that: list a directory’s contents! Using it with -F will give a list of the directories contents, and denote items that are other directories with a trailing /.

ls -F

On my server returns:

allthethings.txt important.doc Indominus/ Misc/ probs.xls Red Wings/ Spreadsheets/ Work/

In the above case, allthethings.txt, garbage.file, important.doc, and probs.xls are files, and Indominus, Misc, Red Wings, Spreadsheets, and Work, each with the trailing /, are directories!

There are many other options, or switches, such as -F that can be used with ls for improved results. For example:

ls -lFa

Returns:

dr-xr-x---. 10 root root 4096 Apr 17 12:01 .
drwxr-xr-x. 19 root root 4096 Apr 14 12:45 ..
-rw-r--r-- 1 root root 0 Apr 17 12:00 allthethings.txt
-rw------- 1 root root 483 Apr 14 12:45 .bash_history
-rw-r--r--. 1 root root 18 Dec 28 2013 .bash_logout
-rw-r--r--. 1 root root 176 Dec 28 2013 .bash_profile
-rw-r--r--. 1 root root 361 Jan 1 01:24 .bashrc
drwxr-xr-x 3 root root 4096 Jan 1 01:25 .cache/
drwxr-xr-x 3 root root 4096 Jan 1 01:25 .config/
-rw-r--r--. 1 root root 100 Dec 28 2013 .cshrc
-rw-r--r-- 1 root root 0 Apr 17 12:01 garbage.file
-rw-r--r-- 1 root root 0 Apr 17 11:58 important.doc
drwxr-xr-x 2 root root 4096 Apr 17 11:59 Indominus/
drwxr-xr-x 2 root root 4096 Apr 17 11:57 Misc/
-rw------- 1 root root 42 Apr 14 12:44 .my.cnf
-rw-r--r-- 1 root root 0 Apr 17 12:00 probs.xls
drwxr-xr-x 2 root root 4096 Apr 17 11:57 Red Wings/
-rw------- 1 root root 1024 Jan 1 01:22 .rnd
drwxr-xr-x 2 root root 4096 Apr 17 11:56 Spreadsheets/
drw------- 2 root root 4096 Apr 14 12:42 .ssh/
-rw-r--r--. 1 root root 129 Dec 28 2013 .tcshrc
drwxr-xr-x 2 root root 4096 Apr 17 11:57 Work/

In the above case two switches are added: -l and -a. The -l uses the long listing format, and the -a switch lists all of the files, including hidden files.

Each column contains an important bit of information:

Column | Information | Example

  • 1 | Permissions | drwxr-xr-x
  • 2 | # of Hard Links | 2
  • 3 | User That Owns File or Directory | root
  • 4 | Group for File or Directory | root
  • 5 | File Size | 4096
  • 6 | Timestamp | Apr 17 11:59
  • 7 | Filename | Indominus/

Continue reading “7 Extremely Useful Linux Commands for Beginners”

How to Remove (Delete) a User on Ubuntu 14.04 LTS

Users via Command Line 101: Basic User Interaction
I. How to Add a User and Grant Root Privileges on Ubuntu 14.04 LTS
II. How to Remove (Delete) a User on Ubuntu 14.04 LTS

Pre-Flight Check

  • These instructions are intended specifically for removing a user on Ubuntu 14.04 LTS.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 14.04 LTS server, and I’ll be logged in as root.

Continue reading “How to Remove (Delete) a User on Ubuntu 14.04 LTS”

How to Remove (Delete) a User on Ubuntu 12.04 LTS

Users via Command Line 101: Basic User Interaction
I. How to Add a User and Grant Root Privileges on Ubuntu 12.04 LTS
II. How to Remove (Delete) a User on Ubuntu 12.04 LTS
Pre-Flight Check
  • These instructions are intended specifically for removing a user on Ubuntu 12.04 LTS.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 12.04 LTS server, and I’ll be logged in as root.

Continue reading “How to Remove (Delete) a User on Ubuntu 12.04 LTS”

How to Remove (Delete) a User on Fedora 21

Users via Command Line 101: Basic User Interaction
I. How to Add a User and Grant Root Privileges on Fedora 21
II. How to Remove (Delete) a User on Fedora 21
Pre-Flight Check
  • These instructions are intended specifically for removing a user on Fedora 21.
  • I’ll be working from a Liquid Web Self Managed Fedora 21 server, and I’ll be logged in as root.

Continue reading “How to Remove (Delete) a User on Fedora 21”

How to Remove (Delete) a User on Fedora 20

Users via Command Line 101: Basic User Interaction
I. How to Add a User and Grant Root Privileges on Fedora 20
II. How to Remove (Delete) a User on Fedora 20
Pre-Flight Check
  • These instructions are intended specifically for removing a user on Fedora 20.
  • I’ll be working from a Liquid Web Core Managed Fedora 20 server, and I’ll be logged in as root.

Continue reading “How to Remove (Delete) a User on Fedora 20”

How to Remove (Delete) a User on CentOS 7

Users via Command Line 101: Basic User Interaction
I. How to Add a User and Grant Root Privileges on CentOS 7
II. How to Remove (Delete) a User on CentOS 7
Pre-Flight Check
  • These instructions are intended specifically for removing a user on CentOS 7.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.

Continue reading “How to Remove (Delete) a User on CentOS 7”

Information on CVE-2015-0235 (GHOST) Vulnerability for Red Hat and CentOS

A vulnerability found in the glibc library, specifically a flaw affecting the gethostbyname() and gethostbyname2() function calls, that allows a remote attacker to potentially execute arbitrary code. CentOS 5, CentOS 6, and CentOS 7 are potentially affected, thus we want to highlight the following information.

Liquid Web package repositories have been updated. Many servers (barring those with updates disabled) have received an update that patches this vulnerability, however, a reboot will still be required in those cases.

Continue reading “Information on CVE-2015-0235 (GHOST) Vulnerability for Red Hat and CentOS”

How to List Which Apache 2 Modules are Enabled on Fedora 21

The Apache web server is one of the most popular and powerful web servers in the world due to its ease of administration and flexibility. This flexibility comes Apache’s modular design, and allows for such features as: URL rewriting for SSL encryption natively, and Outlook Anywhere passthrough support in reverse proxy setups. Modularity allows Administrators to modify Apache to meet their needs; adding modules that are needed and removing ones that are not.

Pre-Flight Check
  • These instructions are intended specifically for viewing which Apache modules are enabled on Fedora 21.
  • I’ll be working from a Liquid Web Self Managed Fedora 21 server with Apache 2 installed, and I’ll be logged in as root.

Continue reading “How to List Which Apache 2 Modules are Enabled on Fedora 21”