Please recommend me a good free online course to learn linux or bsd console.

hi , i know how to tinker with terminal do this and that a bit , but never ever actually officially learned properly so i need…
for example that course should contain:
file editing from console
Oh, here's something important that nobody bothers mention in any tutorial: ⚠️ the single most important thing when learning *any* file editor ⚠️ is to learn the various ways to quit, escape, undo (and did I say quit?) from the editor, before you try to use it.

The first time you accidentally open an entire directory in vi or emacs and you don't know how to back out, you'll remember this tip. 🤣
 
Oh, here's something important that nobody bothers mention in any tutorial: ⚠️ the single most important thing when learning *any* file editor ⚠️ is to learn the various ways to quit, escape, undo (and did I say quit?) from the editor, before you try to use it.
I still rely on a Type :qa and press <Enter> to exit Vim prompt if sudo -e doesn't go to nano (I'm not sure on differences but some OSs and editors don't have that prompt with Ctrl + C leading to an online search how to exit what's assumed vim)

But learning how to do that proper is a good idea :p
 
All of the things listed above and more can be found in the O'Reilly book Classic Shell Scripting by Robbins & Beebe. It doesn't just cover shell scripting but also sed, awk, regexes, manual pages, processes etc.
I second this.

The OP's question can be summarized as "How I get into Unix[like]?"
As this thread shows: there are several points about it, and several ways.

It's boring, pointless, and above all impossible to first study everything of what's it all about in theory, and then start working with it. You better just start working with it. Pick the tasks you need to do with your machine(s) (first could be to realize a backup-plan), learn how to realize them, realize them, and then rate what you learned into the categories of the "jigsaw puzzle 'Unix'" which gains you the meta-knowledge what makes Unix so powerful, way above solving single tasks.

Those categories may be named as:

1. Shell. You already figured that out. You need to get used to shell usage. Unix means using the shell. GUI is an optional extra to the shell, not vice versa. The shell is where the power lies. And where most of the work is done. At least the work on and with the system.
Which shell is secondary. But I recommend to focus on sh, not bash.
At least for the start on FreeBSD.
You may add or change to (an)other shell(s) anytime later - or not. You better learn the internals first, before getting lost in the shell's features. The (important) internals are the same. What differs are the features (and some other things; but don't get us lost in details.)

Command line using will become computer usage by muscle memory, which means keyboard, not mouse shoving. That can only be trained by using it over, and over again.

Plus: Dig a bit into the shell internals (ls, cp, mv, rm, cd, mkdir, ln, ...), some core basic unix tools (cat, grep, find, wc, cut, paste, head, tail, awk,...) and an editor, of course. When combined you'll be amazed what you all can do with those! (For years I don't have no filemanager installed anymore. Don't need one.)

Plus: Dig a bit into shell scripting. This is not just the more sophisticated glue to make single commands, filters, and programs work together, but it's first choice to automate individual tasks on your machine(s).
That's what a computer is all about: automation.
Learning computering means to learn how to automate. Using computers means to automate jobs.
Anything else is consumption.

2. Unix Philosophy. Find also other texts about it. Try to understand the ideas behind it.
For example: Name and compare downsides and benefits of either having many small, combinable modules to one large monolithic "jack-of-all-trades", while considering at each: learning effort and work efficiency short- vs. long-term, flexibility, adaptability, conformability, suitability, universality, maintainability.
See every unix[like] comes by its very nature as a software development platform. It may be very basic, but it's there. It's not for to write steam's next bestseller, but to close the gap of what the other tools may lack.
"All a dwarf needs is an axe." [Terry Pratchett]

3. A hunch of C. This maybe is already advanced, and maybe not really unavoidable necessary, but sooner or later you will stumble over certain issues you better have at least an idea of the underlying programming of the system.
C is Unix. And as long as most parts are written in it: Unix is C.
You don't need to master C. You don't even have to program in it, especially not your daily production. Though some things I rather and quicker do with a small C-source than in a shell script, while for many other things using C was a madness. They better be done with a few lines in a shell-script (See: Master Foo and the Ten Thousand Lines), or in another language. Finding out yourself, which tools there are, what is used best for what, and above all what suits you best, is part of the adventure.
But IMO kind of a slightly advanced beginner's class knowledge of C, a bit more than just "hello world" is very valuable not only to better understand Unix, but when you deal with things not only at the very surface, but start to dig a bit into system's details, even into shallow waters.
But, as I said: C is not top priority. Shell and Unix Philosophy first.

The book fraxamo mentioned is a very good recommendation to get anybody from zero into advanced Unix usage on a very solid base, because it contains all the real important things.
Additionally I like to recommend Kochan, Wood, Shell Programming in Unix, Linux and OS X, Addison-Wesley
It can be used as a prelude to the first book. It does not cover that many topics, does not dive as deep into them, and does not bring you as advanced, but therefore it gets you quicker into the basics.
 
I can do this guys , thank you all for all these resources,books,guidance,motivation and most important the philosophy.

my dream is to become a hacker.

and a hacker needs to understand things better than the average user or the maker herself/himself.
Heh, I took the case off a computer in an AutoCAD course in high school, reset the BIOS with jumper (to allow boot selection), booted a Rainbow password cracker CD, and got the local admin pass of every computer in a few mins :p

All I wanted to do was update the NVIDIA driver for better FPS in AutoCAD rendering :cool:
 
Heh, I took the case off a computer in an AutoCAD course in high school, reset the BIOS with jumper (to allow boot selection), booted a Rainbow password cracker CD, and got the local admin pass of every computer in a few mins :p

All I wanted to do was update the NVIDIA driver for better FPS in AutoCAD rendering :cool:
😄 wow impressive resetting the BIOS with jumper. crazy.

you must be the coolest hacker in the school.
 
Save your money.
OJT. On the job training. Learn by doing.
Just look-up something when you don't understand. Don't be afraid to wreck your system. Its FREE. Just copy your important config files to USB for backup.
Oh, here's something important that nobody bothers mention in any tutorial: ⚠️ the single most important thing when learning *any* file editor ⚠️ is to learn the various ways to quit, escape, undo (and did I say quit?) from the editor, before you try to use it.

The first time you accidentally open an entire directory in vi or emacs
I really think any new user should veer away from the old tools.
ee = Easy Editor is in base and for a new user or Linux Nano user it is the easiest to understand in my opinion.

I know for veterans this is blasphemy but the editor is your #1 command line tool and easy is better.
If you have to guess how to close a program it has failed.
 
Some one mentioned built-ins and I think it is very important part and not documented as well as they should be..

"Built-In" means your "User Shell" has its own set of built in commands.

Your shell History Command is one such "built-in". Because it is a built-in command the documentation is found under your shell documentation.

So man history shows you all built-in commands. Not helpful. Because history is a built-in command every user shell has its own manpage..
man csh for the stock FreeBSD user shell. History command is found in there but it is not an easy read.. Starts at "History Substitution".

Is this a good time to mention /bin/tcsh is symbolically linked to /bin/csh? It acts different due to its settings file.
 
Many of us grew up in the "old" days -- when you bought an expensive PC or Laptop -- turned it on, booted it up for the very first time and what you saw was:


... and... that's it ! :cool:

You either knew what do next or you stared at that prompt forever. I remember spending a wad of cash in the late 1980s when I was buying my first 8088 laptop computer, booting it up and that is exactly what I saw. So ya ! - those were the days of DOS (aka Disk Operating Systems).

UNIX/*BSD/Minix/Linux/etc was a "step above" the DOS prompt back in those days. With (any UNIX) then as in (now/today) -- you could immediately have 1-to-many actual "Users" all simultaneously connected to the same computer/PC/whatever all at the same time and all running their own programs and doing whatever they wanted all at the same time ... and they may not even be aware of each other. And the computer easily managed multiple sessions and everything "works"! All of these users shared modems, network cards, printers, disk space, pretty much everything all at the same time.

We also played multi-player games at "the terminal" - a popular multiplayer terminal game at the time was hunt(6) -- but I also played a lot of Peter Langston's Empire - Scroll down his page to "Empire". Hours and hours of wasted time !
 
Many of us grew up in the "old" days -- when you bought an expensive PC or Laptop -- turned it on, booted it up for the very first time and what you saw was:


... and... that's it ! :cool:

You either knew what do next or you stared at that prompt forever.
Oh geez, yeah. I was fourteen back then.
I begged my parents for to get me a computer for years. Not a chance to earn the money myself back then. Unix machines were completely out of the question. User access only available at universities, large companies, military, or nuclear research sites, anyway unaffordable for a private person; so nothing a twelve year old german even dared to dream of. (I saw WarGames. A pupil with an own computer at home login into the school's computer? Which school's computer? In germany at that time remote future.) I wished for a C64, CPC464, or at least a Sinclair, anyway one others also have, so I could share software, experience, and knowledge with them. I was impressed by the demoscene. I wanted to learn programming like those dudes (Assembler on bare metal.)
Christmas 1986 I got a Schneider PC1512 (german license built of the Amstrad), with a single 5.25" floppy and without a HDD (too expensive.) My father, not knew the slightest shit about computers at all, let himself been "adviced" by a local office machines dealer:"That's the future." Those are the moments when you have to show great joy, while actually you are really deeply disappointed.
This thing costed my father more as he'd paid for a machine I wished for, and it was practically completely useless.
It came with 4 floppy disks: One containing some useless garbage I don't remember anymore. Two contained the GEM Desktop, which back then was most progressive. But besides a most simple texteditor (MS Win98's Notepad was emacs in comparison to that thing), and a paint program, it only provided a filemanger, which was completely pointless on that thing. Without a HDD already while booting you made the DJ - constantly switching floppy disks: two for GEM Desktop, one for your "production" - constantly reloading and swapping [on floppy disks!] No cheerful computering at all. Even the guys with Datasette only had a more comfortable equipment.
The fourth disk contained MS-DOS 3.2: The very bare system, with an even more primitive text editor, and that was it! No programming language, no nothing. My very first "programming" steps had been adding pointless echo BS lines into the Autoexec.BAT. There was nothing else, you could do with with thing, besides copy files, formatting disks, copy disks, delete files.
Several times I checked by the office dealer who sold that machine to my dad to figure out some software for that machine: CAD, dBASE (what want a teenage pupil do with that? And without any HDD also completely unusable) or Borland Turbo Pascal - all at prices way beyond I couldn't afford in ten years. While all what had made me lucky had been a simple Assembler.
In my whole school there was exactly one other student who also had a IBM PC at home. So I had to grovel regulary to one of the unpopular nerds to beg for maybe he graciously hands me some software, being happy with all what I got by pure chance. No exchange of computer experience, above all no programming, nothing. A few black copies of games, only. My father:"I knew it! Finally he got a computer, and all he does with this thing is gaming, only."
One day, suddenly I got a floppy disk with GW-BASIC on it! 😍 Finally. At least something. - Well, getting your very first programming experiences with BASIC without any programming class but learning all alone by yourself lays not a good foundation for your later programming. I needed some time to stop thinking in "GOTO".😂
Later I also got Borland's Turbo Pascal (without any library, but still) which was a big improvement. Still no Assembler for me. There already was the dogma Assembler must not learned.
Then later in C class at U our tutors despaired of us, except those who had Z80s or did some demostuff on their C64s of course (I believe among Z80 users more programmed in Assembler, while the majority of C64 users played more), because we lacked most fundamental basic understanding of computers. Our tutors learned programming on machines still on punch cards, not seldom Assembler. So sure they got an idea how a processor works and values are presented in RAM.
And when I got my first Windows machine (95), this MS shit still lacked of a programming language. So did all the succeeding MS "OSs" I experienced: 98, 2000, NT, XP, 7 - then I broke with this shit.

So, by principle this didn't change in the last fourty years:
You need to get (buy) some extra software, or you stick with C:\>_ - even if this looks way more fancy today, because it's made very colorful and you can click on it with the mouse. 😛
Well okay, that's not quite correct: Additionally to that cracker of a texteditor today's Windows comes by default with "games", a paint program, a media player, and a webbrowser. So you can at least view porn - and paint in it.
Something I had appreciated very much as a teenager.

However, ancient history.
But that's why to me it's still a small wonder that today I work on my own FreeBSD machine, and any unix[like] comes with at least a C compiler. Believe it or not, and you are allowed to laugh, but in my early days with Linux and FreeBSD it was a real joy for me after installation just to write and compile a simply "hello world", just feeling happy to have a free compiler on board by default. ☺️
 
My first PC came with Windows 98, so I always had a GUI https://forums.freebsd.org/threads/weird-looking-pcs.99870/#post-723895

The downtime of waiting for my local PC repair shop to fix my OS after I broke it is what got me into being a sysadmin :p I didn't have long-term personal data and was used to losing it with the repairs (shop only did clean OS installs no backup/restores), so I did the same thing and got into clean-installs. XP -> Vista on 512MB RAM got me into not entertaining OS version upgrades :p (it took longer than a clean install and I was pretty good at those by then with drivers on USB/etc)

I know of DOS a little with Hexen. I started looking into non-Windows with Ubuntu 6.06 and got into Hackintosh around Tiger/Leopard/SL.
 
my dream is to become a hacker.

and a hacker needs to understand things better than the average user or the maker herself/himself.
Then Books are your choice. Forget about (most) online tutorials, and above all youtube videos.
Those are good for a peek, or a quick start, such as Learn X in Y Minutes, but after all best - most, fastest - you learn from real books. Because in the end all you truly need is the text, not the pictures, or any other multimedia BS decorate it.
Every not complete reading noob reads faster than anybody can (comprehensibly) talk. Doing a book like "Classic Shell Scripting" as a movie would produce a movie for at least 20 hours - who's gonna to watch that? 😴 - while you can read through such a book in 6...8h.
Allmost all the books mentioned here in this thread (there are other threads in this forums naming others, too), are not only worth reading, but you get them for a few bucks in used bookstores.

Aiming to become a hacker is a target worth aiming at, as long as on your way you will also learn that it takes a lot knowledge, a lot experience, and a lot effort to create and build something, while destroying something needs nothing.
 
And when I got my first Windows machine (95), this MS shit still lacked of a programming language. So did all the succeeding MS "OSs" I experienced: 98, 2000, NT, XP, 7 - then I broke with this shit.

That's awesome history :). My earliest "school" computer was Apple ][ -- and those computers were always "behind glass floor to ceiling walls and locked doors". Nope - school kids could only look through the glass walls and peer at the Apple ]['s -- only the teachers and the other "adults" got to actually use the marvolous miracle machines of the future. But there was... Apple ][ Trek :-). When the adults are away...

My Windows progression was pretty similar: MSDOS, Win 3.1, 95, 98, ME (Millennium Edition -- "Good God" that was an awful release), XP, Vista, 7, 8, 10 and recently 11.

School was a mix of DEC VMS, BSD 4.2, BSD 4.3, (Xenix, etc), with some real "odd ball" other Unixes tossed in -- think IBM/AIX and other "Try me!" proprietary hardware and proprietary Unix O/S's.

I really tried to like DEC VMS... But dang I could not type THAT MUCH ENGLISH... at least with the exact precision and accuracy that VMS DCL always required. I can't image what a foreign language VMS DCL (DEC Command Language) must have been like.. especially a foreign language without a corresponding word for "SET" or "SHOW".

VMS:
$ COPY/SINCE=11-DEC-1996/MODIFIED [JONES.LICENSES.DOG]*.* *
$ COPY COMPANY_HOLIDAYS.TXT CHAOS"JONES PANDEMONIUM":\DISK2:[JONES]*

and then VMS would literally create a "version" of (ALL) the disk files that (I EVER) made/created/edited in my VMS HOME directory. So (a file) named POUND.LIS would be named POUND.LIS;1 to like.. I dunno.. POUND.LIS;50 and "some how" I would know that I want version 39 (POUND.LIS;39) of it? And (NO) I never did figure that out :cool:

Code:
In the following example, version 17 of the file POUND.LIS is deleted:
$ DELETE POUND.LIS;17

In the following example, versions 16 and 17 of the file POUND.LIS are deleted:
$ DELETE POUND.LIS;16,;17

In the following example, all versions of the file POUND.LIS are deleted:
$ DELETE POUND.LIS;*

(OR) I could just login to (ANY) UNIX and...

Code:
$ cp company_holidays.txt /disk2/.
$ rm pound.lis
$

Unix commands are like... Assembly instructions! We are good !
 
You are all so lucky, you grew up with ones and zeros right out of the box they came in.
We had no ones, we hat to saw a zero in half and carefully bend the pieces straight to make ones!

Okay, my first contact with the digital world was playing hangman on a ZX81, a neighbor had one and had typed the listing in and was not powering it down as long as anyone wanted to have a go. No way to save that, you know?
 
You are all so lucky, you grew up with ones and zeros right out of the box they came in.
We had no ones, we hat to saw a zero in half and carefully bend the pieces straight to make ones!

Okay, my first contact with the digital world was playing hangman on a ZX81, a neighbor had one and had typed the listing in and was not powering it down as long as anyone wanted to have a go. No way to save that, you know?
So, you talk about the 1980s in east germany? 😁:cool:
 
whoa I guess I am a pup in this community 🫡

You either knew what do next or you stared at that prompt forever. I remember spending a wad of cash in the late 1980s when I was buying my first 8088 laptop computer, booting it up and that is exactly what I saw. So ya ! - those were the days of DOS (aka Disk Operating Systems).

Ironically that is what I do today. I guess my version at boot time in 2026 is

sh:
root@bsd:~ #
 
whoa I guess I am a pup in this community
Nah. This community is in fact way broader - also young teenagers here.
But this is just another gossip of the common grey beards war stories thread we grey beards like to have. 😁
You get used to it. :cool:
And you better listen, what we old guys have to tell! Because there's lots you youngster can learn!!☝️🥸 😂
 
So, you talk about the 1980s in east germany? 😁:cool:
Nah, West. Okay, that with the zeros was in jest, we had all the TTLs you could shake a stick at, but we also had a serious problem of education in the dark arts. People still remembered what IBM Hollerith machines were used for, and with good reason warned against those tendencies. Sadly, that impacted the younglings, we had to solder our own hardware for a time. But then again there was education to the rescue, there was a TV program over the summer holidays that taught you how to make your own Z80 machine (the NDK 'Klein' Computer, look it up). That thing evolved in later years over the 68000 to the 68020. I was good with the soldering iron, not so good at making my own boards and I absolutely sucked at the people skills needed to get them elsewhere.

And to circle back to the topic, best way to understand all this new stuff is to start with some old stuff. Before you can treasure your csh, you have to spend some time on a VAX. And before you can treasure that, some time looking at the blinking rectangle behind the "A:\>" on a monocrome monitor. Understanding the "God save the Queen,8,1" joke would help, but is not mandantory.
 
Back
Top