Before Linux was as useful and interactive as it is today, it was a mere command prompt. Today, we still use command prompts -- also called terminals -- to handle tasks that seem too complicated for modern Linux GUIs, including crayonOS. Let's get familiar with crayonOS's terminal application that comes standard with every install; Tillix.
To open Tillix, locate the yellow/orange icon on your Dock that looks like this:
You should be greeted with a window that looks something like this:
This is a terminal environment. We'll be going over a few basic commands you should familiarize yourself with while using crayonOS.
The sudo
command (short for Super User DO) allows you to run a single command that normally requires superuser (AKA Admin) privileges. Operations like modifying the Linux source code, manipulating system scripts, and sometimes running your own scripts require superuser permission. Think of it like you're the superuser for just one command. In order to run a sudo
command, put the key phrase sudo
at the beginning of the command then the command itself. You'll need to enter your password as authorization to run it. Your password won't show up on the terminal as you type it, so don't worry if you don't see anything when you're prompted to enter it. After you enter your password, press the Enter or Return key to finally execute the command.
sudo
command is executed.Now that you know a bit about the sudo
command, let's move onto some basic commands that do some operations to benefit your crayonOS system.
Ubuntu's version of the "install wizard" is apt-get
. Since crayonOS is a custom Ubuntu distribution, we will utilize this method to install applications and code libraries we need to run programs. apt-get
is the name of the function we need to grab packages of code for crayonOS to use, but there are several attributes that we can enter along with this command to change what the system grabs for us. In this guide, we'll go over four main attributes that you'll use on a regular basis in a terminal environment: update, upgrade, install, and remove.
When running apt-get update
, crayonOS will connect to the internet and look for any updates to already existing packages of code in your hard drive.
To run it, we'll need help from the sudo
command, or else when we press Enter after putting it in our terminal environment, we'll get this error:
When used correctly, the terminal environment should look something like this:
Remember those packages your system just pinged with sudo apt-get update
? When you run sudo apt-get upgrade
, you're telling the computer to replace the existing packages of code with the newer ones it found. It's recommended to update and upgrade frequently, especially after installing any new applications to your system.
The system we're using is fully updated to all the latest versions of every package. If it weren't, we would see a screen that would list all the packages to download and a command prompt at the bottom that would say something like:
This upgrade will consume 8096MB of storage. Continue? [Y/N]
Typing in Y or Yes next to this prompt tells the computer to start installing the newest packages. Typing in N or No will cancel the whole operation. Make sure to keep storage space in mind before upgrading your packages!
The most common command you'll use outside of a user friendly interface is the sudo apt-get install
command. Using this command, you'll be able to install programs and their packages of code needed to run the program as long as crayonOS has the repository for it (more info on that later on). To use this command, type in sudo apt-get install
and the name of the package. For this example, we'll install a faulty program called Dog Food Prices, which has a ID tag of "dogfoodz."
Notice the error we just received: Unable to locate package dogfoodz
. Because our install was faulty and there's no such program that crayonOS knows a repository to called "dogfoodz", our system is unable to install the program. However, if one did exist, you'd see the same type of list as in apt-get upgrade
, with a list of packages to install and a confirmation prompt with the size it'll consume.
apt-get remove
is as obvious as it sounds; it gets rid of any package you tell it to. After running this command and the name of the package, the terminal will tell you how much space will be freed, as well as confirmation for if you really want to remove it or not.
cd
(short for Change Directory) is one of the most important commands in the Linux terminal. It's just as obvious as it sounds; it changes the current directory that the terminal is working in. The default directory for crayonOS is /home/user/. This means that from Tillix, you should be able to access any of the files in the Home folder of the Files app as long as you know the name of the folder and name of the file. To navigate the system directory deeper into the home folder, we would do something like this:
cd Downloads/CatPics/MyCalicos
Doing the above statement is the same thing as going to your Files app and double-clicking the Downloads folder and opening the sub-folder CatPics with the sub-folder MyCalicos to see the files inside. Why would we use it in a terminal over just finding what we need in the Files app? The answer: accessibility.
Let's say you want to modify some code in your crayonOS build so that instead of the default crayonOS logo showing up whenever you look at the "Details" section of the Settings app, you want to display a picture of your cat. This is where the cd
command comes in handy. First, you'd have to find the image file in the system files of your crayonOS build. To do that, we'd need to backtrack to a directory that's in a folder outside of the one's we're in right now. To backtrack a directory, we would use the ..
attribute.
Example: If we wanted to backtrack from the main Tillix directory (/home/user) to just /home, we would do the following:
Notice how once we entered in that command, our Tillix window shows us our current directory with blue text before the $. We can view what's in the current directory by doing cd
and double-tapping the Tab key.
But how does this have anything to do with setting a cat picture as your crayonOS logo? Well, a lot, actually. Anything past the /home/ directory is superuser controlled, which means it has limited writing privileges and for critical system files, even reading privileges! If we tried dragging and dropping a cat picture to the folder that stores all the system images, we would get an error that says "Permission Denied" or wouldn't even be able to drop it in at all. To override this, we would need to use a terminal and do a sudo
command inside the directory by using cd
to navigate and find the files we need.
The final function we'll go over in this guide is add-apt-repository. This command is important, especially when dealing with unknown system libraries. Your crayonOS system already comes pre-installed with some libraries, including those from Ubuntu which are recognized as safe. Developers can apply to put their own packages into these shared folders, but some programs require their own just because they need so many packages that it's too much for a common folder to handle. For example, installing the latest version of Google Chrome or Mozilla Firefox would require you to add a link to their file system to your system. This is called a repository.
To install the Google Chrome repository, we would do:
sudo add-apt-repository ppa:google-chrome-stable
Running the above statement will allow your system to see a link to where all the files needed to install Google Chrome can be found. After running this statement, we can install the google-chrome-stable
program with the sudo apt-get install google-chrome-stable
command.