Forem

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?

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay