r/Ubuntu • • 1d ago

Start using Ubuntu

Hi I’m new in this environment, I want to start understanding Ubuntu’s terminal and learn how to use it, can someone suggest me where to start etc?

20 Upvotes

27 comments sorted by

13

u/cyberd_e 1d ago

type sudo apt update && sudo apt upgrade -y

1

u/KecoMarcels79 10h ago

yeah this is basically the first thing you should run after a fresh install

4

u/rogershredderer 1d ago

Look up any and all terminal commands that you want with no fear. It can be a burden to have them all memorized but luckily various communities share the helpful commands.

5

u/Hot_Dog2376 20h ago

Google "The Linux Command Line"

It is a free text book.

3

u/tomscharbach 23h ago

The best way to learn the command line is to use the command line.

Set aside a few hours every week to learn the command line, one task at a time.

Pick something that you do using Ubuntu's menus and learn how to do that using the command line. Learn about the command and the command's variables, and then use the command to so whatever it is you set out to do.

If you do that, you will come to understand the command line in a useful way that will stick in your head because you learned how to do things with the commands rather than just memorizing the commands.

You will be surprised how much you've learned over the course of a year if you do that one simple thing.

My best and good luck.

2

u/SpiritedInflation835 1d ago

You can start by looking around:

ls lists the files in a directory, ls -lah lists them with file size and ownership

htop and glances are good ways to see what the system is busy with (upload a screenshot to an AI to have it fully explained, it's LOTS of data)

ctrl-C stops a process that you've started at the terminal

adding a & at the end of a command moves it to the background so you can still use the terminal while the command is running

rm removes files (rm -rf * is the dangerous one - the star is a placeholder for ALL directories and files. The r means it will delete all subfolders, too. It's a good idea to have a backup ready.)

Grab an external drive and start backing up your /home directory with rdiff-backup. It's simple and robust.

1

u/CosmicTaskTinkerer 1d ago

Here's one for your Linux journey: https://labex.io/linuxjourney

1

u/wijsneus 23h ago

There's bound to be some tutorials, but here's some basics.

In the terminal you can run programs that do usefull stuff. You'll probably see something like [your-username@your-computername:~]$ and a cursor. The terminal starts in your current working directory. Just like when you open your file manager, this is probably your Home directory.

So - when you type a command - you are starting a piece of software. Let's start with some basic file management. These commands have names that are somewhat logical. The names are sometimes abbreviations, sometimes obscure histories :)

Here are some examples you can try:

`ls` - this lists the content of the current directory. In this case your Home directory. Have a look at the home directory in you file manager, and type ls in the command line and compare. Read '`ls` as `list`

You can also add arguments to a program like ls. To get an overview what these are you can almost always add --help to a program.

You can chain these arguments together. A usefull one is - for example - `ls -al` this lists all the files (including the hidden ones prepended by a `.` and list the rights, owner, and some other information about the files in the current directory - it helps to read this as:
`ls - a l`
`list - all files, one file per line'

Now - let's move into another folder. The command is `cd` which is short for `change directory` and the argument the name of the folder you want to move into. These names are case sensitive.

`cd Documents`

`ls -al`

You should now see the contents of your Documents folder. Also - you should see something like :~/Documents at the beginning of the line - showing that your current working directory is Documents

`cd ../` moves you one directory up.

Open the text editor and create a text file in Documents. Paste some random text in it and save it.

You can use the command `cat` (read as `catenate`) to show the contents of the file. so type `cat filename.txt` to show it on screen. Cat is meant to merge files together, so you can go `cat filename1.txt filename2.txt` and have them output on screen as one file.

You can create a new file with the content of both files by going `cat filename1.txt filename2.txt > filename-combined.txt` - read as `concatenate filename1.txt and filename2.txt and output to filename-combined.txt`.

Now - `cat filename-combined.txt` probably fills your screen and you want to read it at your leisure. So you can go `less filename-combinedt.txt`. This will show the content of the file, but you can now navigate through it with arrow keys and the page-up and page-down keys. It can also search through the text. Type `h` while you are in less to get an overview of what it can do, type `q` to quit.

Less is called less because there was a program called 'more' - which you could use to page through text and the programmer building a better version found it funny to call it that because "less is more". `more` is also installed. I leave it to you to check that out :)

Now - the power of the command line is that you can very easily chain commands like this together via a pipe. One program can use the output of another program as input. This goes a bit too deep for here :)

So - you could use `cat` to redirect multiple textfiles to a program called `grep` to perform searches in that text and output the the whole to `less` so you can page through the results.

`cat filename1.txt filename1.txt | grep "word-to-search" | less`

anyway- very short intro. hope it helps. Go find actual tutorials, and be careful what commands you run because you can easily screw up your system

1

u/hammer0112 20h ago

Remove the French language pack

1

u/hba111 19h ago

Unpopular opinion: ask chatgpt or claude if you're stuck. You can also use warp

1

u/BranchLatter4294 16h ago

Start with whatever you used the terminal for in your old OS.

1

u/sSummonLessZiggurats 16h ago

If you're ever not sure what a command does, use the manual to look it up. Type "man <your command here>" and you can look up any command right in the terminal.

1

u/alec_me 15h ago

If you can stand all the lies and toxicity inherent in the output of an LLM, you might give this link a gander. Actually has some sage advice at the very end:

Learn what each command does, try it on files you can safely modify, and get comfortable reading its help. Then add the more specialized commands as real needs arise.

The most important habit is not memorizing commands: understand what a command will do before pressing Enter, particularly when it modifies files, changes system settings, or runs with administrative privileges.

1

u/sqldropme 12h ago

Try to do what you do in the GUI via the command line.

Create a file.
Edit that file.
Move that file.
Compress that file.
Convert that file.

Learning to do these will help you figure out what is possible in the terminal and how to go about learning it.

Learning terminal without a specific goal can be tricky, as it can do anything. (A computer is a terminal first, GUI second.)

Edit: grammar

1

u/sqldropme 12h ago

Also reading man pages “man ls” or “man cat” is a good way to learn whats possible with any given command.

1

u/PeyredB 10h ago

For the basics, know that the syntax is a little different.

Windows: command target switch(es) - C T S
Linux: command switch(es) target - C S T

Then learn the equivalents of common commands:

cd -> chdir
md -> mkdir
move -> mv
ren(ame) -> mv (yes, you would "move" a file within its directory to give it a different name)
del -> rm ("remove")

1

u/HoldOk4092 10h ago

Do the tutorials from Linux Foundation

-2

u/Unable_Mess_2581 1d ago

Don't ask humans, ask AI -- that ChatGPT is even more competent than your average Linux user in this forum.

It can teach you the basic well in structured manner.

3

u/lproven 23h ago

Worst. Advice. Ever.

"Ask the magic lying bot to think for you."

-3

u/Unable_Mess_2581 23h ago

To teach you, learn to read.

It is impartial and have no stupidity and incoherent rambling like yours.

Off to blocklist. Got no time for your kind.

0

u/Outrageous_Fly_9769 21h ago

"how to do X" and then "How to undo X" is the entire chatgpt path.

With a "Did we just uninstall the firmware, plz fix"

1

u/Unable_Mess_2581 9h ago

Another blocked account.

1

u/Sure-Passion2224 7h ago

Another blocked account.

-3

u/Suriak 1d ago

Get claude or chatgpt or grok bot going on it.

Then ask it for anything and everything. It’ll share what you put into the terminal. You paste it back.

But always learn what it’s doing. Don’t just mindlessly copy and paste. Linux is cool and meant for people who like learning

1

u/lproven 19h ago

Bad advice. Do not listen to this person.

LLMs are harmful and toxic. Avoid them if you want to learn.

3

u/Suriak 17h ago

Lmfao bookmarking this

1

u/alec_me 17h ago

I dunno this assessment from Chatgpt seems knowledgeable, pretty accurate and free from toxicity.

The central argument of this assessment is that Proven's principal strength is his combination of technical experience, historical perspective, and willingness to challenge accepted industry narratives. His principal limitation is that his confident, opinionated style can sometimes make subjective judgments or personal experience appear more conclusive than the evidence warrants.