Good Starter book to learn Linux?

hotroderx

Distinguished
May 15, 2008
343
0
18,810
Recently I got a Raspberry Pi micro computer as a fun toy to play with. I am now wanting to learn more about linux. I would like to learn the basic file structures commands etc. I was wondering if anyone had any book suggestions.

I know my way around Microsoft products pretty well. I can install and navigate Linux some what. The problem I am running into is turning my Raspberry Pi into a NAS. I have read several tutorials with no luck. I am just assuming that its my lack of understanding of Linux that is causing me to fail.
 
You won't learn it within a day or two. It takes time.

To navigate, there are a few simple commands:

1. `ls' = list all files in current directory. For more information, `man ls'
2. `cd <path>' = change to a new directory in <path>. For more information, `man cd'

I can help better if you specify the issue in more detail. Other than that, start here.
 

hotroderx

Distinguished
May 15, 2008
343
0
18,810
Thanks guys for the help sorry my question is so vague. I am really not sure what my question should be. I know Windows inside and out and I wanna get to know linux just as well. I will definitely follow that tutorial on setting up my NAS. I will come back for any questions I have using it.
 

hotroderx

Distinguished
May 15, 2008
343
0
18,810
I figured out what my problem was today I was trying to use the VI file editor which was a tad over my head at this stage in the game. I switched to pico and things started rolling along nicely.

In fact I have the entire drive setup and share able over my network. I am having a problem on restarts thought. When I restart I have to re mount the drive using
sudo mount -a command
sudo service samba restart
to get windows to see it.

This really isn't a huge deal but it kinda bothers me because I know I set something up wrong (I don't plan to turn the thing off ever and its on a power backup).

smb.conf I added the following to the end of it

[PI]
comment = pi
path = /mnt/disk1
writeable = Yes
only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes

I also installed
sudo apt-get install autofs

at the end of the auto.master file I added the following
/media/ /etc/auto.ext-usb --timeout=10,defaults,user,exec,uid=1000

I am not sure what I did wrong and if there is any other information that help you trouble shoot this with me dont hesitate to ask. Thanks for the help in advance I am sure these are some pretty basic duh questions I am asking.
 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660
Hmmm, not sure myself but now might be a good time to introduce you to the wonderful world of cron. cron is what runs programs on a schedule in the background. You can install webmin which has a beautifully laid out cron editor along with a bunch of other tools for your server or simply type in the command you want yourself. In your case you want "sudo mount -a" to run at boot. There are two main crons, one for the user and one for the root (administrator). Since your command starts with sudo you need to edit the root cron, "sudo crontab -e" the root cron editor comes up and at the end of the file you can add a job by specifying the time(s) and the command. Since you are editing the root cron you do not need to use sudo so add the line "@reboot mount -a" Ahhh, but you want it to then run "service samba restart" after that. For that you add && which tells cron after you finish with one thing do this next. so your entire cron job becomes "@reboot mount -a && service samba restart" Ctrl+o saves the file and Ctrl+x exits the editor. Now what about the user cron? Suppose you need to download a really big file and you pay less for bandwidth at 2 am or have better connection then, with "crontab -e" (note that it is not "sudo crontab -e) you can now schedule it for anytime, even on a daily or weekly schedule (backups for example) with the time you want and the command "wget http://address of file".

FYI, for a real easy editor give joe a try. Yep, the name of the program is in fact just joe as in any joe can figure it out. sudo apt-get install joe