Tips for the Fresh-born Linux Newbie

Thanks for the link JD P - I bookmarked it (along with all my other "New to Linux") and will read it later tonight.

I do have a question pertaining to the file system on install. My system is a dual boot with an extra internal hard drive on my laptop. (DVD bit the dust, so I replaced it with another hard drive). I purchased the laptop in 2008, so you can see how old the hardware is. I have 4GB RAM, 256GB SSD and an extra 149GB HDD.

One of the nices things about Linux/UNIX OSes is that if the storage is placed into the correct location, with the correct permissions, it will be used. It can "appear" to be there by mounting a partition, using a bind-mount, or just redirecting with a symbolic link. For example, KVM and libvirt likes for huge virtual machine virtual-HDDs to be in /var/lib/libvirt/images. My /var partition (if I have one) will usually be setup to hold log files and apt cache data, not 30 20G virtual machine HDDs. I can go into the libvirt settings and change where the storage pools are located ... or I can simply symlink /var/lib/libvirt/images to /data/vms/ - - done, forever. I wouldn't symlic OS partitions ... it adds another mode of failure to remember later, so if you want /home to be on a different disk, just move all the files there, and change where that new storage is mounted.

OR you can just modify the /etc/passwd file - there is a field for the home directory for any user - they don't have to be anywhere special at all. As long as the passwd file (or whatever equivalent authentication you use) provides the desired, correct, location for the user's HOME, it doesn't need to be /home/userid. /abdsd23rsdfas/userid is just as good. ~/ and ~userid will still work and the $HOME env will be set at login as expected. Of course and scripts that you/the user has written which hard-code /home/userid will fail.

Is ext5 something new or a typo? ;)

Hope this helps.
 


Thank you JD P. I have seen the "links" while browsing my files, moused over them and saw on the status bar where the link pointed.

I also read that the /usr file is where the applications are stored/installed (sorry, don't quite know the lingo), so I think by moving just the files from /home/documents (etc) to the other HDD, and keeping /home path where it is now and have links to the actual files stored in the /home partition pointing to say /media/christi/extra/documents (etc). This keeps any future scripts or downloads that need that path intact, correct? Then actually moving the /usr onto the same partition as the /home as right now they are in the /root or / partition that only has 20GB of space and only 12GB left while the /home partition has 31.7GB of space left.

And yes, it was a typo, should have been ext4!
 
I also read that the /usr file is where the applications are stored/installed (sorry, don't quite know the lingo), so I think by moving just the files from /home/documents (etc) to the other HDD, and keeping /home path where it is now and have links to the actual files stored in the /home partition pointing to say /media/christi/extra/documents (etc). This keeps any future scripts or downloads that need that path intact, correct? Then actually moving the /usr onto the same partition as the /home as right now they are in the /root or / partition that only has 20GB of space and only 12GB left while the /home partition has 31.7GB of space left.

a) I'd link just at the directory level. You can link at the file level and there are times to do that, but not in this case.

b) 20G is huge for OS and applications in Linux. This isn't Windows. I wouldn't worry about it until there is an issue.

c) / or "the root directory" can be confusing because /root is "root's HOME directory" - see the difference? It is worth clarifying, always to avoid confusion. 99.9999% of the time, it is safe to assume root dir = / .... unless it isn't.

My daily use desktop only gets 15G of storage for everything. I keep media files on network storage accessed through NFS, so it doesn't suck up any storage on desktops.
Code:
$ df
Filesystem                     Size  Used Avail Use% Mounted on
/dev/vda1                       14G   11G  1.6G  88% /
Oops. So I lied. It is 14G. ;) I've used this same desktop (updating from LTS to LTS) since 2008. It is where I perform perl webapp development. Of course, if you've never seen a GUI program you didn't want to load, you might need 30G of storage for /usr.

In an earlier post, you had 2 places for large files - one for NTFS and one for ext4? If those are not for programs, just for media, I'd merge that space into NTFS and share it. NTFS is fine for music, videos, movies. It just isn't good when you need real file permissions or need to run programs from the storage or need to build programs. The Linux compilers get confused on NTFS file systems - so it is best to always have programming areas on native Linux/UNIX file systems.

Hopefully, you've read most of those links on my blog ... and have started into the first 100pgs of that Command Line Linux book to get historical background and philosophy of the OS.
 
JD, the NTFS partitions (on both drives) are for Windows. I don't want to co-mingle them, well, except for my books (pdfs). I have a ton of programming books and some of them are for C++ and Perl, which I want to learn, otherwise I would like to keep my Windows and Linux separate. I am going to be getting a bigger second drive to replace the 149GB drive. I want to, eventually, build a network using virtualization, so I would imagine I need some space for the images, not to mention back up.

I am not quite to the command line yet, but that is next on my list. I am still trying to learn the total structure of the file system. I just look at every directory and see what is in there, if I don't know what it is, I google it or come on here and search and read about it. I did follow an external link on your blog, the one "linux for the windows user", that was a really great write up. I am just reading everything I can find and asking questions when I don't understand. You've been a great help, thank you!
 
I am still trying to learn the total structure of the file system. I just look at every directory and see what is in there, if I don't know what it is, I google it or come on here and search and read about it.

There is a method to the file system layout, a standard. The key thing (for me) to understand it was that in the old days, storage was expensive, so much of the disks were shared across many different physical computers of a similar type through NFS. The file system layout was designed so that program areas could be mounted read-only across many machines, but settings for each specific machine which had to be local would be read-write. It is hard to wrap your head around this in a single-computer, single-user environment. In a lab with 200 systems, and 500 users, it becomes very clear how important that sort of thing was when disks were less than 1G in size.

HowToGeek has a short article about the file system layout. "linux directory structure explained" - didn't see an article about this here. My account here can't directly link to the article.

It also helps to know that on UNIX-like systems, everything is a file (deep down), unless it is a process. The mouse is a file, keyboard, touchpad, NIC, HDD, are all files ... even directories are really files with lists of files inside (this is an oversimplified explanation, but close enough). ;) With this core understanding, it makes learning about file/directory permissions very important to overall system security. The access to audio output on a system is controlled by normal file permissions with users/groups/other. It really is a powerful model. For anyone with a programming background, this knowledge is helpful towards understanding. If you aren't a programmer, it can safely be ignored, until a deeper understanding is desired.
 
Last edited:
HowToGeek has a short article about the file system layout. "linux directory structure explained" - didn't see an article about this here. My account here can't directly link to the article.

It also helps to know that on UNIX-like systems, everything is a file (deep down), unless it is a process. The mouseis a file, keyboard, touchpad, NIC, HDD, are all files ... even directories are really files with lists of files inside. ;) With this core understanding, it makes learning about file/directory permissions very important to overall system security. The access to audio output on a system is controlled by normal file permissions with users/groups/other. It really is a powerful model. For anyone with a programming background, this knowledge is helpful towards understanding. If you aren't a programmer, it can safely be ignored, until a deeper understanding is desired.

The "everything is a file" put the "2+2=4" together for me. I made a lot of sense and was quite surprised that it was as simple as that, well, if you're speaking simplistically!

I am a programmer. Started with VBA, (well, no, started with "IF" statements in Quatro/Quatro Pro during the late 80's), but from VBA I then went to VB5 (for a very short time) then VB6. Then Microsoft abandoned us VB6 programmers and changed VB into OOP with .NET. That was a GOOD thing. Really helped with me learning other programming OOP languages. My career took a change in course and I eventually became a SQL Server DBA/Architect with MS SQL Server 7 and went working professionally through until version 2008r2. I became ill and had to stop working (I have Crohn's disease and Multiple Sclerosis.) but kept up with the SQL Server side (I love data) but about a year ago I started to update my skills and saw that examples and documentation is severely lacking for VB.NET and is pushing us VB programmers to learn C#, which I refuse.

Then came Linux...

I have learned the Open Office and OfficeLibre do have a form of BASIC for creating modules, sadly Callibra I noticed is going with Qt & JavaScript for their scripting language (if they're going to have one AT ALL, seems they want to go with pre-built "macros" into Kexi) instead or without a derivitive BASIC. I know a bit of JavaScript, but converting all those Access DB and Excel spreadsheets that were written in VBA? Oh heck no I don't want to do that. I do contract out and write LOB applications for small business who can't afford their own IT dept. So, with my learning Linux and the OOo BASIC, I should be able to set up a network and write LOB applications as another option than the Windows and MS Office route for my clients.

Learning Linux has really opened a lot more doors for me AND my clients!
 
Hi Devyn, I have read the threads/articles/tutorials that you and the other writers have done. I did, on both "main" articles (list of tutorials), all the beginner and intermediate articles and sub-articles. (You probably have figured that out by now ;) ) and I must say I enjoyed them very much! I even installed my very first "VM" following your tutorial on that. I think I really benefited from the reading and now I am going to concentrate on actually doing. I have a couple of sites for shell scripting as I want to get with the command line instead of using Linux like Windows. A lot of stuff was over my head, but now that I sort of know what's out there, I am not so terrified of screwing up my laptop. I don't know if I am thinking (or thought) that Linux was harder than it really is. It's just new and I see so many opportunities for myself and most especially, my clients.

I installed the Linux Mint Debian Edition (MATE desktop) in my VM and I think I like it better than the Linux Mint KDE (yes, it's still Debian, but doesn't have the layer of Ubuntu and all the programs installed.)I don't want a version that is loaded with applications, I want to choose those myself. I am going to play around with some other distros before making a decision on which on to install on the hard drive to replace what I have now.

I have a couple of "Linux Command Line" and "Programming Interface" books that I want to go through. I am ready for those now. (I have had them in my books library since 2013!) I am one of those geeky people who actually enjoys reading technical books and does each and every one of the examples. My ultimate goal is to learn C/C++, but I think I will start with Python and hold off the C/C++ for a 6 months or so when I am a bit more wise about Linux and have used it for a while. I just don't know which version of Python to start with. I held off on reading all the threads on the different programming languages that you (or someone did, but I think it was you) put together as I didn't want to lose focus of just learning the OS and the command line. Once I get those mastered then I will most likely be able to start programming. I really want to learn Oracle Database. It's one of the main reasons I want to learn Linux.
 
@ChristiW , Python3 would be the best one to lean since it is newer and has more features. Sometime, Python2 will be deprecated.

I am glad that you are enjoying the site. Obviously, you have the forums to ask any questions you may have. Enjoy!
 
Superb Article
Great info i think whats left is introduction to Shell Programming a ebook link will be great
 
Superb Article
Great info i think whats left is introduction to Shell Programming a ebook link will be great

There are many bash scripting guides. The one I always go-to is the "ABSG". I suspect there is a "BBSG" and an "IBSG" too for beginners and intermediate learners.
* http://www.tldp.org/LDP/Bash-Beginners-Guide/html/
* http://www.linux.com/learn/tutorials/278507-bash-201-intermediate-guide-to-bash
* http://www.tldp.org/LDP/abs/html/

There you go.

Michael Potter gives a great presentation on "Seat Belts and Airbags for bash" which teaches some of those advanced tricks to make our scripts bullet-proof. I've seen it a few times and learn more each time. errexit, noclobber, and a few other settings and techniques.
 
Last edited:

Members online


Top