DEV Community

Cover image for LINUX GUIDE USING UBUNTU
Busa Ayim-Odu
Busa Ayim-Odu

Posted on

LINUX GUIDE USING UBUNTU

Linux is an open-source, Unix-like operating system kernel created by Linus Torvalds in 1991. The kernel is the core part of the operating system, managing system resources and hardware interactions.

This is a thorough template for an Ubuntu learning guide that covers everything from downloading Multipass **to **system information, file and directory operations, search and locate, and text file editing. Ubuntu is a popular Linux distribution developed by Canonical.

Download and configure Ubuntu Desktop:

  • https://ubuntu.com/download/desktop.
  • After download follow the default setting to install.
    Ubuntu 1

  • After it has been successfully installed, it appears like this. Go ahead, configure and start running any virtual machine.
    Ubuntu 2

  • This is what it looks like once it is ready for use: To run command as an administrator (user "root"), use "sudo "
    Ubuntu 4

I'll now go over how to use Powershell to operate an Ubuntu virtual machine.

  • We begin by identifying the "Root user" and using this command to do so "sudo su" as seen below. Root User

Navigating the file system

  • pwd: Print working directory. Shows the current path.
    HOME DIR

  • ls: List directory/file content. These shows the contents in the directory/file as shown below. Although we haven't done anything but the command is important and will revisit it.
    ls

  • mkdir: To create a directory/file. Make we will be create some and listing them out using the ls command.
    mkdir

  • ls -l: shows directory/files with detailed information.
    ls -l

  • cd ..: Move you in and out directory level. cd as means change directory.
    cd ..

  • To play around with firsts of commands and introduce some common commands like:

  • history: this shows you all commands carried out

  • exit: Exit the root/ or current path.

  • clear: Clear the terminal
    Exit

  • touch: to create an empty file. touch newfile.txt
    touch

  • cp: Copy file or directory. I copied a file into directory Busaspace1 and leaving the original copy in it folder
    CP

  • mv: move file to different locations/paths. Just like the command "cp". Moving a file to directory Busaspace2.
    move

  • rm: This command remove/delete files.
    rm

  • rmdir: This command remove/delete directory.
    rmdir

Viewing and Editing files

  • cat: Display the contents of a file. After editing a file using the command "vim", I used cat to show the content edited without opening the whole file cat

vim: is an editor. Open file and allows you to edit a file after pressing the i key for insert.

vim

System Information and Management

uname -a: Display detailed information about the system
uname

df -h: Display disk space usage.
disk

free -h: Displays usage and available space
Free

  • top: Display running process and system resource usage. And to stop it press Ctrl C if the terminal keeps running. Top

Search and Find/Locate

-grep [pattern or search item][file]: Search for a pattern within a file.

vim2
grep

How to quit a text editor

![quit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/72mid4izrxay8kwns4pw.png\

Task

  • How does one quit a vim file?
  • how do you list the content of a directory?
  • what command can be used to delete the content of a directory?
  • What command can be used to switch from a normal user to a root user?

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more