mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > jvang

Reply
 
Thread Tools
Old 2018-06-18, 19:22   #23
jvang
veganjoy
 
jvang's Avatar
 
"Joey"
Nov 2015
Middle of Nowhere,AR

22×3×37 Posts
Default

Working on Chapter 2 of Linux Essentials, here's what I have so far:

Origins of Linux
  • Basically an overview of the background of Linux, its roots in Unix, and properties of OSs at the time.
  • Cooperative vs Preemptive multitasking: Cooperative meant that programs could voluntarily give up CPU time for other processes, but might hog all of it. Preemptive multitasking allowed the kernel to schedule CPU time for each process without it needing to voluntarily give up control
Changes to Linux since the 1990s
  • Kernel improvements, such as networking features and hardware drivers
  • Similar improvements to support tools like the GUIs and shells
  • New distributions
Basics of open-source software
  • The user can make, modify, redistribute changed versions of the software, and the source code is freely available.
  • Benefits of open-source software: better code (from peer review and edits), more flexibility and customization, free of charge.
Basic overview of embedded computers
  • Examples: cell phones, e-book readers, DVRs, car computers, and appliances.
Types of larger computers
  • Desktops, laptops, and servers
  • All three are pretty similar; a desktop is a typical PC, a laptop is a more portable and constrained desktop, and a server is sometimes larger than a desktop and requires special networking software.

Last fiddled with by jvang on 2018-06-18 at 19:22 Reason: typing is hard
jvang is offline   Reply With Quote
Old 2018-06-18, 19:56   #24
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

23·17·73 Posts
Default

Quote:
Originally Posted by jvang View Post
Working on Chapter 2 of Linux Essentials, here's what I have so far:
Importantly, don't just read. Do.

Do you have a Linux instance you have root access to installed yet?

Do you know how to edit files from the console?

Do you know why doing something like "rm -rf /" as root is a really bad idea?

I would highly recommend you create a virtual machine where you can experiment, especially when you start doing "superuser" work. And then when you mess up (as we all do) you can restore, and continue.

IMHO, reading is great. But actually typing the commands and dealing with the results is where "real" sysadmins are made.
chalsall is offline   Reply With Quote
Old 2018-06-18, 20:01   #25
xilman
Bamboozled!
 
xilman's Avatar
 
"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

101010101111012 Posts
Default

Quote:
Originally Posted by chalsall View Post
IMHO, reading is great. But actually typing the commands and dealing with the results is where "real" sysadmins are made.
Especially if that is performed on your "usual" machine. It gives you a real incentive (a) not to screw up and (b) to know how to recover when (not if) you do screw up.

That said, you should keep another machine around so that you can get assistance when you do screw up.

As they say, BTDT, GTT-S.

If you don't screw up you're not doing it right.
xilman is online now   Reply With Quote
Old 2018-06-18, 21:02   #26
jvang
veganjoy
 
jvang's Avatar
 
"Joey"
Nov 2015
Middle of Nowhere,AR

22·3·37 Posts
Default

Yeah, a cheap little laptop we have is running Debian. I already have quite a bit of basic experience with Ubuntu and Debian, in addition to dabblings in CentOS. These first couple of chapters are just really basic facts and knowledge to know for the sake of knowing. Ch1 is OSs, 2 is Linux history, and 3 is software licensing. At Chapter 4, I'll get to use really basic programs, mostly in the GUI. 5 is hardware management, mostly just knowing what a motherboard and a CPU is. Finally, in Chapter 6, I'll learn some basic command line stuff. And for 11 more chapters...

It's really basic stuff; they're not exaggerating by using the term "Essentials." If you didn't know at least some of the stuff in this book, you probably would not know what a computer was if it hit you in the head!



Quote:
Originally Posted by chalsall View Post
Do you know why doing something like "rm -rf /" as root is a really bad idea?
I probably shouldn't type that, since IIRC "rm" is remove files, "-r" makes it recursive/delete the whole directory tree from the specified location, and "-f" deletes each file without any hesitation or prompt. I'm also kinda sure "/" would refer to all of your files, though it might work like "./". Not too sure on that last one but I'm not very confident in testing it since I don't feel like trying to recover the entirety of my 32 GB hard drive

Last fiddled with by jvang on 2018-06-18 at 21:04 Reason: typing is hard
jvang is offline   Reply With Quote
Old 2018-06-18, 21:25   #27
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

23·17·73 Posts
Default

Quote:
Originally Posted by jvang View Post
I'm also kinda sure "/" would refer to all of your files, though it might work like "./".
It doesn't. Your first guess was correct.

"./", "../" and "/" are *very* different things. The first two are relative to your "Current Directory". The last is absolute; the top of the file system.

And, yeah, no. Don't run the command to find out what happens (although you could always do "ls -R / | less" (and then hit the spacebar a few times) to see what files and directories would be effected)....
chalsall is offline   Reply With Quote
Old 2018-06-18, 23:54   #28
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,851 Posts
Default

There is also ~/ which usually refers to your home directory -- although it can be set to something else.
paulunderwood is offline   Reply With Quote
Old 2018-06-19, 00:39   #29
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

explains the command talked about.

Last fiddled with by science_man_88 on 2018-06-19 at 00:45
science_man_88 is offline   Reply With Quote
Old 2018-06-19, 11:47   #30
Nick
 
Nick's Avatar
 
Dec 2012
The Netherlands

22×3×5×29 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
There is also ~/ which usually refers to your home directory -- although it can be set to something else.
We can use this to illustrate one of the divisions that Joey listed above:
special characters such as "~", "?" and "*" are abbreviations which get expanded by the shell before a command is executed, while the "." (for current directory) and ".." (for the parent directory) are part of the filesystem within the kernel.
So if you write a program which uses files, you can use "." and ".." without any problems, but if you want to have things like "*" as well, then you must write the code to expand them or call a library function to do it for you before the filename is passed to the kernel to open the file.
This also means that you can create a file called "*", for example, but that's probably not a good idea!
Nick is online now   Reply With Quote
Old 2018-06-19, 16:22   #31
jvang
veganjoy
 
jvang's Avatar
 
"Joey"
Nov 2015
Middle of Nowhere,AR

22·3·37 Posts
Default

Quote:
Originally Posted by Nick View Post
We can use this to illustrate one of the divisions that Joey listed above:
special characters such as "~", "?" and "*" are abbreviations which get expanded by the shell before a command is executed, while the "." (for current directory) and ".." (for the parent directory) are part of the filesystem within the kernel.
So if you write a program which uses files, you can use "." and ".." without any problems, but if you want to have things like "*" as well, then you must write the code to expand them or call a library function to do it for you before the filename is passed to the kernel to open the file.
This also means that you can create a file called "*", for example, but that's probably not a good idea!
Ok, good stuff to know!

According to the local Linux genius who tried "rm -rf /" once for the heck of it, it won't actually let you do it. You need to put in an additional modifier, "--no-preserve-root," to actually delete root files.

Edit: Felt like I should post some stuff about my Linux system. Here's my hardware specs:
  • 2 GB of RAM
  • Intel Celeron Dual Core CPU N3060 @ 1.6 GHz
  • Intel HD Graphics 400
  • 32-bit Debian GNU/Linux 9
  • 280 GB of storage (/home on 32 GB eMMC, / on 250 GB M.2 SSD)
  • 14" 1366x768 display
It came with Windows 10, which ran considerably worse than now. It really only has 3 things going for it: very cheap, very light, and the battery life is decent. IIRC, 2 GB of RAM is half of what is the recommended minimum for Windows 10, and the original hard drive was a tiny embedded 32 GB eMMC stick.

Last fiddled with by jvang on 2018-06-19 at 18:58 Reason: typing is hard
jvang is offline   Reply With Quote
Old 2018-06-20, 08:32   #32
Nick
 
Nick's Avatar
 
Dec 2012
The Netherlands

6CC16 Posts
Default

Until a few years ago, every PC came with at least one old-fashioned serial port.
These were great because the signalling was simple enough that you could attach your own electronics directly.
Is the Raspberry PI available in the US? It runs Linux too but makes it possible to play with the hardware as well as the software.
Nick is online now   Reply With Quote
Old 2018-06-20, 08:52   #33
xilman
Bamboozled!
 
xilman's Avatar
 
"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

2ABD16 Posts
Default

Quote:
Originally Posted by Nick View Post
Until a few years ago, every PC came with at least one old-fashioned serial port.
These were great because the signalling was simple enough that you could attach your own electronics directly.
Is the Raspberry PI available in the US? It runs Linux too but makes it possible to play with the hardware as well as the software.
USB to serial converters are readily available ...

Last fiddled with by xilman on 2018-06-20 at 08:53
xilman is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Musings of someone learning airsquirrels Math 20 2018-12-29 18:15
Online language-learning course kladner Lounge 8 2013-04-18 03:08
Learning Python - Course from Google Jeff Gilchrist Programming 3 2012-01-15 00:29
flowcharts, self-learning jasong jasong 6 2007-12-07 14:06
Learning About RAM the Hard Way Longshot Hardware 5 2005-05-21 16:40

All times are UTC. The time now is 09:54.


Sat Oct 16 09:54:50 UTC 2021 up 85 days, 4:23, 0 users, load averages: 1.04, 0.98, 0.98

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.