🐧
Ethereum - Ubuntu for Beginners
  • Ethereum - Ubuntu for Beginners
  • Ubuntu 20.04 - Exercises
  • Ethereum 2.0 - Resources
  • How Much Is Enough?
Powered by GitBook
On this page
  • Introduction
  • Table of Contents
  • Ubuntu 20.04: Introduction || Applications || Terminal || Practice
  • Ubuntu 20.04 - Desktop
  • Ubuntu - Security
  • Home PC vs "Headless" Server
  • Ubuntu - Applications
  • Application Names: Windows vs Ubuntu
  • File Viewer (aka Files)
  • Text Editor
  • Terminal
  • Screenshot
  • Dual View - CLI & GUI
  • Linux - Directories
  • Root Directory
  • Sudo Command
  • Username
  • Important Directories
  • Linux Terminal - Basic Commands

Was this helpful?

Ethereum - Ubuntu for Beginners

NextUbuntu 20.04 - Exercises

Last updated 3 years ago

Was this helpful?

Introduction

Goal: Teach basic Ubuntu concepts and skills in order to encourage home staking on Ethereum. The target audience is anyone with basic tech skills and a desire to learn.

Table of Contents

Ubuntu 20.04 - Desktop

Ubuntu desktop has several features that make it ideal for running a validator on Ethereum 2.0:

  • Wide support and documentation with the Ethereum ecosystem

  • User friendly, easy to learn

If you'd like to try Ubuntu, you can use these instructions to create an Ubuntu live USB:

Ubuntu - Security

Ubuntu is secure right out of the box and is generally resistant to viruses and malware. The best way to maintain a secure environment is to use it as a dedicated Ethereum machine. No other applications.

Home PC vs "Headless" Server

Ubuntu has both desktop and server versions. Servers have no graphical user interface (GUI), which means the only access to a server is through terminal commands (CLI).

Ubuntu desktop allows you to operate in a normal desktop environment (GUI) while still using CLI.

For most users, a home PC is easier to operate and more secure than a remote server because you have direct physical access, which allows you to disable remote logins and prevent the majority of attacks.

Ubuntu - Applications

Application Names: Windows vs Ubuntu

Windows

Ubuntu / Linux

Document Writer

Microsoft Word

LibreOffice Writer

Spreadsheets

Microsoft Excel

LIbreOffice Calc

Presentations

MS Powerpoint

LibreOffice Impress

Web Browser

Internet Explorer

Firefox

Photo Editor

Adobe Photoshop

GIMP

Image Editor

MS Paint

Image Magick

PDF Viewer

Adobe PDF

Document Viewer

Text Editor

Text

Text Editor

Email Client

MS Outlook

Thunderbird Mail

Command Line

Command Prompt

Terminal

Computer Settings

Control Panel

Settings

Software Updates

Windows Updater

Ubuntu Software

Open-source applications have come a long way in recent years, and many FOSS programs are now as good or better than their closed-source counterparts.

You can visually explore different directories and files using the Graphical User Interface (GUI)

Basic text editor for simple documents and copy/pasting

Running an Ethereum validator requires entering commands directly into the terminal (aka command line interface). CLI can be intimidating at first, but it's fairly intuitive and easy to learn.

You can use the following shortcuts for Linux CLI:

  • Ctrl + Alt + T || Open new terminal window

  • Ctrl + Shift + C || Copy selected contents from terminal window

  • Ctrl + Shift + V || Paste contents into terminal window

  • Ctrl + C || Stop a running terminal process

  • Up/down Arrows || Cycle through last used commands

Dual View - CLI & GUI

Open a terminal window with Ctrl + Alt + T and move it alongside the file viewer. This allows you to see information displayed through Command Line Interface (CLI) and Graphical User Interface (GUI).

The screenshot below shows the contents of the Home directory through both CLI and GUI.

Linux - Directories

Linux systems do not have "drives" like with Windows (e.g. C: or D:).

The entire Linux directory system is a series of nested directories, with the top being the /root directory.

Root Directory

AVOID USING ROOT ACCESS

The root directory contains all other directories, and the root user has control over the entire system. A mistake while working as root user can cause irreparable damage.

The best practice is to generally never use root access, and instead have regular users that can use the sudo command

Sudo Command

Adding sudo to the front a command runs the terminal command as administrator. This helps prevent accidents because the user doesn't have root access, but they are still able to run commands as admin when needed.

If you get an error that you don't have permission to perform this action, you may need to use sudo

Username

This guide was created on a PC named ubuntu with the username ubuntu You'll notice that CLI below starts with ubuntu@ubuntu which identifies user@pcname

You can use the command whoami to see the current user name.

Important Directories

When you open a new terminal, it will begin in the home directory

Directory

Description

/

Root directory

~

Home directory ( same as /home/YOURUSERNAME)

~/Desktop

Desktop directory

~/Documents

Documents directory

~/Downloads

Downloads directory

/media/YOURUSERNAME

Directory for USB and other external devices

/var/lib/goethereum

Go Ethereum directory

/var/lib/lighthouse

Lighthouse directory

/var/lib/lighthouse/validator

Lighthouse validator directory

/var/lib/lighthouse/beacon

Lighthouse beacon directory

usr/local/bin

Directory used to run Lighthouse binary

Linux Terminal - Basic Commands

This table shows a list of commands, but the following section will discuss in greater detail.

Command

Description

Sample Code

clear

clear terminal window (fresh screen)

clear

cd

change directory

cd ~

ls

list contents of current directory

ls

ls -l

show file permissions

ls -l sample.txt

pwd

print working directory (show current directory)

pwd

history

shows history of terminal commands

history

sudo

gives root permission to run programs or make changes

sudo

mkdir

make a new directory

sudo mkdir ~/test

nano

create or edit system files

sudo nano test.txt

rm

remove file

sudo rm test.txt

rm -r

delete directory and all contents (remove recursively)

sudo rm -r testfolder

cp

copy/paste a file

cp test.txt ~/Documents

chown

change ownership of a file/directory

sudo chown -R goeth:goeth /var/lib/goethereum

chmod

change permissions of a file/directory

sudo chmod g+r sample.txt

adduser

create new user

sudo adduser mikejones

deluser

delete user

sudo deluser mikejones

update

update system database for new packages

sudo apt-get update

upgrade

upgrade packages (run after update)

sudo apt-get upgrade

install

install applications

sudo apt-get install geth

remove

remove applications

sudo apt-get remove geth

help

display help info (use -h or -help or --help)

geth --help

Now that we've covered directories and commands, let's practice with a few exercises.

This is part of a broader Ethereum educational effort. Find other Eth2 community resources .

Ubuntu 20.04: || || ||

Comprised of

Designed to boot as a live USB for

|| ||

You can click the icon in the bottom left corner to show the installed applications.

File Viewer (aka Files)

Text Editor

Terminal

Screenshot

This tool is helpful if you have an error and want to post a screenshot in the for help.

here
Free and Open-Source Software (FOSS)
generating Eth2 keys offline
Windows
macOS
Linux
EthStaker Discord
Practice
Introduction
Applications
Terminal