Admin... by accident!

You may have chosen to be an admin. I didn't!

  • Home
  • FreeBSD
  • GNU/Linux
  • Security
  • Network
  • Virtualization
  • Politics
  • Github
  • Donate
  • Me

What is UNIX?

April 23, 2017 by Albert Valbuena

UNIX is an operating system. And your known equivalent is Windows or the Mac. You may even know about Linux. The purpose of an OS is to accommodate programs in order to get some work done. Editing pictures, browsing the web or serving data from a database. It is the thing that lets you operate with the computer and the programs you install on it. Okay, this is not primary school. But sort of is.
UNIX and Linux (which are inspired in the former) are the operating systems which work behind the scenes in many sites. From banking systems, to communications, robotics, aeronautics, etc. Even your phone works on it. Android uses the Linux kernel and a lot of java in order to work. iOS from Apple uses large bits from the BSD’s and software of their own creation.

In UNIX design everything is represented as a file. Even devices are identified as files in the system. And UNIX is old. Painfully old. It dates back to the seventies and at the time computing wasn´t envisioned the way it is today nor the GUI (Graphical User Interface) had been invented. It was being designed at Xerox Park. Therefore the only way to edit files wasn’t very graphical so to speak. Everything was done at the command line and nowadays this is still a very useful method but a pain in some ways. Don´t think about it as an inferior method. Windows Server 2012 can be also installed and operated as a non graphical system. You should start getting used to computing as being served in different ways for different purposes.

So in UNIX, specially in the server side of UNIX, you will end up editing lots of files in order to accomplish a task. Configuring a desktop environment, a web server, many things are set up via editing files at the command line. Obviously modernity has come in and there are graphical ways to administer desktops and servers. If you are just looking for an OS to do the classical desktop work, editing pictures, filling cells on a spreadsheet with your own accounts, email, etc you can pick anything from a Linux distribution like OpenSUSE or Ubuntu, to a UNIX such as OpenIndiana, Mac OS X or Solaris. And ,of course, you can also do that with FreeBSD. However the latter comes with no GUI. If you want one you can install and configure one yourself but you can just download PC-BSD. It is vanilla FreeBSD with the graphical arrangements for a desktop already set for you to get stuff done. Great OS.

Editing files in UNIX

Editing files in a UNIX server is a basic task but it is cumbersome for the newbie. If you happen to have an Apple Macintosh you have an UNIX system but designed for the desktop. Although it still has the UNIX bits underneath. So grab the Finder, go to Applications, go to Utilities and look for an application called Terminal. (Linux or PCBSD users should look for the same kind of application. It can be called in different ways, terminal, konsole, etc.) Open it up. Welcome to the UNIX arena. Don´t you know what to do? If computing was well taught you could do stuff. Since it isn’t you can’t. Let me teach you one thing.
There is a realm of small programs built into that application called Terminal. One of them is called vi. Vi is a plain text editor. And vi is used to edit files in UNIX. Apple uses an improved type of vi, called Vim. Don’t look for buttons to push or boxes to tag. The same applies in a Linux distribution, any BSD and the proprietary UNIX left today. The terminal is a command line interpreter and you launch all those programs by typing commands in it. There are some list of commands (which are programs) for UNIX so you can have a basic idea of a common few. The wikipedia entry is an starting point but there are several others. For now, let’s edit our first file.

Select the Terminal.app and open it up. Now type vi and the name you want to give to that file. A blank page appears. Don’t type yet.

Vi is complicated. So if you start typing you won’t see anything happening. To get letters in you have to first press the letter “i” and then vi is in interactive mode. Press the letter “i”. And type something like: This is a test.

Now you want to stop editing the file and save it to disc. To stop editing, and that means being off the interactive mode press the key “ESC”. And to save the file press :wq. The : stands for input for orders. W stands for write. And the Q for quit.

You are now back at the terminal and you’ve just edited your first file in UNIX. Don’t you see it? Launch another program to enlist the content. Type ls. See your file listed? Do you want to remove it? If so type rm filename. rm stands for remove. And the filename must be the name you gave to the file. So if you entitled it as Test, to remove it you just have to type rm Test. And yes upper case and lower case matter in UNIX. A file called test is not accounted as the same file called Test.

If you find the articles in Adminbyaccident.com useful to you, please consider making a donation.

Use this link to get $200 credit at DigitalOcean and support Adminbyaccident.com costs.

Get $100 credit for free at Vultr using this link and support Adminbyaccident.com costs.

Mind Vultr supports FreeBSD on their VPS offer.

 

Filed Under: FreeBSD, GNU/Linux

Recent Posts

  • How to install Redis for WordPress on FreeBSD
  • How to compile cloudflared in FreeBSD 13/14
  • How to configure FreeBSD to use a webcam (version 12 and 13)
  • Symbolic and Hard Links in UNIX and Linux
  • How to import iocage jails to Bastille on FreeBSD 13
  • How to load and unload kernel modules in Linux
  • How to use find in GNU/Linux and FreeBSD
  • How to install Mate on FreeBSD 12/13
  • How to install Nessus 10 on FreeBSD 12
  • How to enable TLS traffic from the origin server on Cloudflare Argo Tunnel
  • How to use Cloudflare’s Argo Tunnel service to publish a website on FreeBSD 12/13
  • How to setup MariaDB master-slave replication on FreeBSD
  • How to upload a FreeBSD custom image on DigitalOcean
  • How to install Drupal 9 on FreeBSD 13.0
  • How to manage site visitors based on IP Geolocation
  • How to enable Geolocation in AWStats on FreeBSD 13.0
  • How to install AWStats on FreeBSD 13.0
  • How to configure Modsecurity 3 for WordPress on FreeBSD
  • How to configure Apache HTTP with a TLS reverse proxy backend on FreeBSD
  • How to detect a WAF – Web Application Firewall

Archives

  • November 2024
  • October 2024
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • February 2023
  • January 2023
  • December 2022
  • April 2022
  • March 2022
  • October 2021
  • September 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • September 2018
  • June 2018
  • May 2018
  • April 2018
  • February 2018
  • January 2018
  • November 2017
  • April 2017

RSS Admin… by accident!

  • How to install Redis for WordPress on FreeBSD
  • How to compile cloudflared in FreeBSD 13/14
  • How to configure FreeBSD to use a webcam (version 12 and 13)
  • Symbolic and Hard Links in UNIX and Linux
  • How to import iocage jails to Bastille on FreeBSD 13
  • How to load and unload kernel modules in Linux
  • How to use find in GNU/Linux and FreeBSD
  • How to install Mate on FreeBSD 12/13
  • How to install Nessus 10 on FreeBSD 12
  • How to enable TLS traffic from the origin server on Cloudflare Argo Tunnel

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in