New Sections on Unix Tutorial Website

Unix Tutorial Website

I’ve been making changes everywhere around UnixTutorial.org and want to take this opportunity to both share the news and gain your feedback. Please take a moment to leave a comment or reach out on Twitter or Facebook.

Unix Reference

I’m adding new sections to the Unix Tutorial Reference section, these are going to be the pillars of how-tos and tutorials on this blog. Some are active and linked, others will be updated in this post as I publish them.

  • tmux – and everything I know and like about it
  • SSH – this will cover both SSH client setup and SSH server configuration
  • GRUB bootloader – it’s getting great improvements lately and still stays as the default boot loader in majority of Linux distros
  • sudo – basics and advanced techniques for privilege escalation
    Linux kernel – what it is, how it works and how you can use it effectively
    Docker – basics description and common operations
    tmux – why and how you should use tmux for better productivity
    SELinux – securing Red Hat based distributions
    AWS – getting started with AWS cloud
    OpenStack – how to setup and use your own (on-prem) cloud solution

Unix Commands

The original Basic Unix Commands and Unix Commands sections are some of the most popular sections, and that’s even before I launch another way of documenting all of them (stay tuned!).

But because I’ve recently started blogging increasingly more about hobbies and Unix Tutorial projects, I think I’ll be covering more of the OS distro specific commands in the next few years.

Specifically, there following are being added:

  • Linux Commands – mostly suited to a desktop Linux user right now, but will gain server grade commands soon
  • macOS Commands – it’s rare that one needs to use a macOS specific command or launch a graphics application using terminal shell. But that’s exactly why I think it’s important to know how to do this and to learn some of the great commands macOS has to offer

Similar to the Unix Reference section, I think the Unix Commands area will eventually include Docker commands, AWS commands and OpenStack commands as well. I know, they regularly get collapsed into a single mighty command with lots of options instead of continue as individual commands, but we’ll see.

Am I missing something important? Are you learning or using other commands that would justify a separate section on a website like mine? Please let me know and I’ll be glad to research and document things for all of us.

See Also




Great Things You Can Confirm with dmidecode

dmidecode-command

I’ve just started working on the Linux Commands section of Unix Tutorial, and dmidecode is one of the best commands to mention when it comes to recent Linux distros. It’s found in most distributions and helps with learning lots of useful facts about your environments – both physical and virtual.

How To Use dmidecode Command

dmidecode command needs to be run as root and shows you hardware information about your system:

  • BIOS name and version
  • manufacturer of your server, desktop or laptop
  • model name and serial number of your system

Simply run the command and pipe it to a pager like more or less:

greys@xps:~ $ sudo dmidecode | less
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.2.1 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.
Table at 0x000E0000.

Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
Vendor: Dell Inc.
Version: 1.2.1
Release Date: 02/14/2019
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 32 MB
...

Browsing dmidecode output and searching through the output are the best ways to use dmidecode command, but once you become familiar with your environment you’ll probably get a few dmidecode parameters you can grep for.

Hardware Vendor with dmidecode

This will report the manufacturer of your system. For my XPS laptop, it shows Dell:

greys@xps:~ $ sudo dmidecode | grep Vendor
Vendor: Dell Inc.
Vendor ID:

Model name with dmidecode

Look for the Product Name to confirm the name of your system. It shows my laptop’s model for me:

greys@xps:~ $ sudo dmidecode | grep Product
Product Name: XPS 13 9380
Product Name: 0KTW76

Motherboard with dmidecode

Finding the motherboard model will require you to search through the less pager output (press / and start typing word motherboard, then scroll up and down).

Here’s what one of my dedicated servers shows:

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Supermicro
Product Name: X11SSE-F
Version: 1.01
Serial Number: ZM163S009892
Asset Tag: To be filled by O.E.M.
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: To be filled by O.E.M.
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0

Serial numbers with dmidecode

Just grep for the word Serial to find lots of serial numbers of various recognised devices. One of them (the first one in the output) is the Dell’s service tag that you usually need for hardware support:

greys@xps:~ $ sudo dmidecode | grep Serial
Serial services are supported (int 14h)
Serial Number: 50G8V**
Serial Number: /50G8V**/CN***00***00F8/
Serial Number: 50G8V**
Serial Number: Not Specified
Serial Number: Not Specified
Serial Number: To Be Filled By O.E.M.
Serial Number: 0A3E
Debug Use USB(Disabled:Serial)

There’s lots of other things dmidecode is useful for – I’ll be sure to update the dmidecode command page going forward.

See Also




Most Useful Basic Unix Commands

unix-tutorial

Seems the Basic Unix Commands section is gaining popularity online – that’s great to see, means I’m putting focus where it’s actually needed. Today I want to share my view of the most useful basic unix commands – the ones that I use daily.

What Defines a List of Daily Used Commands

The types of commands you will need depends on the tasks and how you go about them. Chances are, most of your work is done remotely – which means one of your most used commands could be git or ssh.

Apart from this, it’s unbelievably awesome how the majority of daily work can be accomplished using very basic unix commands, nothing fancy at all.

If you’re a software developer, you’ll probably have your share of programming language interpreters and compilers along with other components of a DevOps toolchain, but even with them in the picture there’s still quite a chunk of work done using the most beatifully simple commands like cd and ls.

Daily Tasks I Accomplish with Command Line

Here’s the list of things I get to do pretty much every day:

  • navigate around filesystems
    • where am I?
    • go to a specific directory
    • is this the same or separate filesystem?
    • check how much space is there available?
  • check files and directories
    • is there a file named such-and-such?
    • what’s the size of the file?
    • who owns the file (username and group)
    • when was the file last updated?
    • what’s the contents of this file?
  • manage files and directories
    • create a new directory
    • create or edit a file
    • change username or group ownership
    • remove a directory or a file
    • copy or move a file
  • remote access 
    • connect to a remote server
    • copy file from my system to remote server
    • transfer files from remote server to my local system

Basic Unix Commands For Daily Use

I’ll probably show examples of command lines for these tasks in some future post, but for now will just map the basic commands to each section:

See Also