LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2017, 01:51 PM   #16
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511

Quote:
Originally Posted by Jinux75 View Post
So in the system configuration directory /etc there would be a filesystem table i am guessing fstab means, and there would be all the directories which are actually different drives(filesystems)? I am now on a live cd of tiny core and i have mounted the hda (sda) and am in /etc. I can see fstab when i ls. but when i do cd /fstab it can't cd to /fstab... hmmz oohh i see fstab is not a directory it is a file :-|

How can i see the difference between files and directories, i can see all sorts of colours pink, blue, mint greem white and so on. I just cd something and when it says can't cd to something i assume it must be a file... and always the words permission denied.

I'll get there i have loads of time to figure it out. Thanks for the help it is much appreciated.
If you do ls -l, the entries whose permission string starts with a "d" are the directories.
 
Old 07-28-2017, 01:53 PM   #17
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
... Also, be careful with fstab.

Don't modify its contents until you're sure what the changes will do. Improper entries can prevent your system from booting normally.

Best to read up on it first.
 
Old 07-28-2017, 02:19 PM   #18
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
It is so funny it is as of the system is not listening to me when i tell it to do something.

I type mount. Then i see all sorts of mounted loop things.
So i type mount -?
then i see the -o OPT: loop Ignore loop devices. My guess is that all the loop thing will not display.

So i type mount -o then mount -o loop and then mount -o OPT:loop but it always come with the same list.
So where is the logic in that ? i use a switch but i can not seem to get it working right. Do i need to tell the system something else?

And my cd player is sr0 so i mount it with mount -t sr0
then after a few tries i did cd /mnt
and ls tada there is, in blue sr0
So i do cd sr0 and then ls, but nothing no files or dirs. ls -a gives me . and ..

trieing to see the logic but i am flabberguested
 
Old 07-28-2017, 02:22 PM   #19
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
... Also, be careful with fstab.

Don't modify its contents until you're sure what the changes will do. Improper entries can prevent your system from booting normally.

Best to read up on it first.
Ok so i better not vi fstab ! thanks for the heads up, i would not even come up with it until you told me it was a possibility. Haha curious so i only looked.
 
Old 07-28-2017, 02:27 PM   #20
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
Well i have to log off, my working hours are over and i am going home. Have a nice weekend all, Monday i will be back at it, for now thanks for the help and after the weekend i will be posting again until i get the hang of it.
 
Old 07-28-2017, 02:33 PM   #21
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Jinux75 View Post
Well i have to log off, my working hours are over and i am going home. Have a nice weekend all, Monday i will be back at it, for now thanks for the help and after the weekend i will be posting again until i get the hang of it.
You have an excellent weekend as well, Jinux75, and please do return as often as you like. The difficulties you're having (and the associated frustration) is very typical of someone with Windows experience learning linux for the first time. Don't let it bug you - just look at it as a learning experience.

It'll be 2 steps forward 1 backward etc,. etc. for some time to come ... Tons of fun !

Cheers !
 
1 members found this post helpful.
Old 07-28-2017, 03:00 PM   #22
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

I suggest that you learn to use 'man command' such as;
Quote:
man mount
NAME
mount - mount a filesystem

SYNOPSIS
mount [-l|-h|-V]

mount -a [-fFnrsvw] [-t fstype] [-O optlist]

mount [-fnrsvw] [-o options] device|dir

mount [-fnrsvw] [-t fstype] [-o options] device dir

DESCRIPTION
All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several
devices. The mount command serves to attach the filesystem found on some device to the big file tree. Conversely, the umount(8) command will
detach it again.

The standard form of the mount command is:

mount -t type device dir

This tells the kernel to attach the filesystem found on device (which is of type type) at the directory dir. The previous contents (if any) and
owner and mode of dir become invisible, and as long as this filesystem remains mounted, the pathname dir refers to the root of the filesystem on
device.

If only the directory or the device is given, for example:

mount /dir

then mount looks for a mountpoint (and if not found then for a device) in the /etc/fstab file. It's possible to use the --target or --source
options to avoid ambivalent interpretation of the given argument. For example:

mount --target /mountpoint
By using 'man command' you will understand the necessary options for proper usage of any command.

Hope this helps.
Have fun & enjoy!
 
1 members found this post helpful.
Old 07-28-2017, 06:34 PM   #23
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
You're probably having problems installing the MediaTek driver, because you have no build tools installed. You need gcc, automake, autoconf, and those should drag in anything else you need to build source packages.
 
Old 07-29-2017, 02:30 AM   #24
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,639
Blog Entries: 19

Rep: Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469
Quote:
Originally Posted by Jinux75 View Post
How can i see the difference between files and directories, i can see all sorts of colours pink, blue, mint green white and so on. I just cd something and when it says can't cd to something i assume it must be a file... and always the words permission denied.
Oh my, we are green, aren't we! OK, colours in file lists:

Most distros alias ls to ls --color so that you get a coloured display by default. The convention is that directories are deep blue, executable files (scripts and programs) are bright green and symbolic links (think Windows shortcut) are cyan. There are a few others but those are the main ones. And ordinary files are shown in black or white depending on the terminal background. The correct way to find out what kind of file you've got is to use the file command.
Code:
hazel [ ~ ]$ file Desktop
Desktop: directory
hazel [ ~ ]$ file 171209.zip 
171209.zip: OpenDocument Text
hazel [ ~ ]$
System files can only be edited by going to root with su or sudo. Don't do it unless you know exactly what you are doing. Messing with fstab in particular can make your system unbootable.

The philosophy of Linux is different from that of Windows. Windows keeps you out of all contact with the system because it assumes you're an idiot; the fact that you're using Windows at all makes that a reasonable assumption. Linux gives you full read access to the system files and allows you to acquire write access where necessary because it assumes that you're a trustworthy person who won't monkey with things he doesn't understand. It's up to you to prove yourself worthy of that trust.

Last edited by hazel; 07-29-2017 at 02:32 AM.
 
Old 07-31-2017, 02:38 AM   #25
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
Oh my, we are green, aren't we! OK, colours in file lists:

Most distros alias ls to ls --color so that you get a coloured display by default. The convention is that directories are deep blue, executable files (scripts and programs) are bright green and symbolic links (think Windows shortcut) are cyan. There are a few others but those are the main ones. And ordinary files are shown in black or white depending on the terminal background. The correct way to find out what kind of file you've got is to use the file command.
Code:
hazel [ ~ ]$ file Desktop
Desktop: directory
hazel [ ~ ]$ file 171209.zip 
171209.zip: OpenDocument Text
hazel [ ~ ]$
System files can only be edited by going to root with su or sudo. Don't do it unless you know exactly what you are doing. Messing with fstab in particular can make your system unbootable.

The philosophy of Linux is different from that of Windows. Windows keeps you out of all contact with the system because it assumes you're an idiot; the fact that you're using Windows at all makes that a reasonable assumption. Linux gives you full read access to the system files and allows you to acquire write access where necessary because it assumes that you're a trustworthy person who won't monkey with things he doesn't understand. It's up to you to prove yourself worthy of that trust.
Good morning,

for me at least. I am back at work and this green idiot is fooling around with mount. However it is not going so well. And ofcourse i will not change any system files ... yet, haha.
 
Old 07-31-2017, 02:43 AM   #26
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by onebuck View Post
Hi,

I suggest that you learn to use 'man command' such as;By using 'man command' you will understand the necessary options for proper usage of any command.

Hope this helps.
Have fun & enjoy!
Hello,

well i am trying to use the mount command, but for me it is pretty difficult to understand as it seems not to listen to me, probably i am not knowing what i am doing, but if i type mount -? i get a list, on top of the list it says -a mount all filesystems in fstab. So my assumption is that the cdrom player would mount, automatically? but nothing happends. When i look in the UI i see the cdrom is called sr0. Also when typing man mount, man is not found i guess no man pages on the system then... How would i correctly mount the cdrom sr0 to my system, after that i would like to try unmount, but this is a unknown command so i am guessing to unmount i need a different mount switch. For now i just want to mount, man really i am a green idiot :-p

Someone care to explain how i can do this mounting? I will ofcourse keep trying myself when anything happend in a positive way i will post .. :-o
 
Old 07-31-2017, 02:53 AM   #27
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
I am getting something now, i have created a directory in usr/local called cdrom. Dont ask me why i choose /usr/local, but in my logic /usr is me and local is somehwere local on my laptop?¿ ... then i type mount -t /dev/sr0 /usr/local/cdrom.

can't find usr/loal/cdrom in /etc/fstab ... aha so i need to tell the system the location where i would like the directory of my cdrom files...

In the UI i mount and unmount the cdrom by pushing a button. In command line i look at fstab and see already /dev/sr0 /mnt/sr0 it is always there. When i mount ot unmount in the ui. Then i unmount in the ui, and type mount -r sr0 i guess it is mounted? But in the ui it is not and also /mnt/sr0 gives me nothing when ls. it is getting harder and harder to find any logic to it.

Ha i got it, mount -r /dev/sr0 .. but why is it already in the fstab, i want to mount the cdrom to my own location, like say /usr/local/cdrom ... hmm

Aha it is umount instead of unmount. Okay i am able to mount and unmount my cdrom drive now in the command line, but i am only able to mount it in /mnt/sr0 because it says so in the fstab file. No how do i tell it to mount it in a location i want. Or is it just duplicated from /mnt/sr0 to my own location /usr/local/cdrom?

Aha got it, mount /dev/sr0 /usr/local/cdrom

now the content of sr0 is in /usr/local/cdrom, but /mnt/sr0 still exists and there is nothing in it. Is it that in the fstab all the devices are automatically in there or is there a process that tells what devices are put in to fstab? It is also nice, that when the cdrom is mounted it is impossible to open the drive. I need first to umount it and then it will open. So how are these devices put in fstab?
I will add a usb flashdrive and see if i can mount it and how fstab looks. Hey fstab comes with /dev/sdb1 so the flashdrive must be /dev/sdb1. okay okay, i getting the hang of it, i think. But this does not explain how fstab gets this information. Anyone?

Last edited by Jinux75; 07-31-2017 at 03:53 AM.
 
Old 07-31-2017, 04:07 AM   #28
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
Well the fun is back, mounting and umounting like crazy here in different directories. Wheehoo.
Now when i am in msdos, excuse my language, i can make a batch program to do certain things.
I imagine this can also be done in linux. So i will just try something and see what happends.
mount /dev/sr0 /usr/local/cdrom
mount /dev/sdb1 /usr/local/flash

just for fun, no i try using this vi thing as of the only thing i know it is in the system, but is there another standard program for doing this, because vi is not very user friendly...
 
Old 07-31-2017, 04:18 AM   #29
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Hi! Cool to see you enjoying the infinite FUN_puzzles of Linux

A couple thoughts: each 'distro' has tons of unique (different) customizations; in this case, where to mount a CD.

Experimenting with various keywords in web-searching, to narrow-down the info, is a good skill.
Here's a search I tried (I added /proc because I wanted to mention that; fstab better tho):
linux beginner|tutorial mount cdrom .pdf umount "/proc/mounts"

Also, finding something that has a sequence tutorial examples to follow might be easier

Great to see you using the CLI, to learn the underlying foundation concepts!
 
Old 07-31-2017, 04:31 AM   #30
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Jjanel View Post
Hi! Cool to see you enjoying the infinite FUN_puzzles of Linux

A couple thoughts: each 'distro' has tons of unique (different) customizations; in this case, where to mount a CD.

Experimenting with various keywords in web-searching, to narrow-down the info, is a good skill.
Here's a search I tried (I added /proc because I wanted to mention that; fstab better tho):
linux beginner|tutorial mount cdrom .pdf umount "/proc/mounts"

Also, finding something that has a sequence tutorial examples to follow might be easier

Great to see you using the CLI, to learn the underlying foundation concepts!
Thanks, I have a cd called proc, but no cd called mounts inside the proc, so this leaves me with question marks.

I did however download vim and made the automount file.
I then put in mount /dev/sr0 /usr/local/cdrom
:wq
then sh automount

first i needed to make a dir called cdrom, it does not do this by itself .. ofcourse... i had to put this in the automount file as well duhhu.

then i sh automount again and it tells me the device or resource is busy... funny little laptop

oh no it was me the idiot, human error. the device was already mounted. haha now it works.

funny i am asking questions, thinking about it and come up with the awnser on my own, so i delete the question again. How to get back from /usr/1/2/3/4/5 in dos it is cd\ and i go all the way back, here it is just cd / and i am back. Is it called root when i am in / ??? or how is it called.

The next thing that is up is the difference between al these sudo su root stuff. Because ecerytime i try something i get access denied then i just type sudo su and most of the time it works, but what does it actually mean and can i make my own username instead of root@box:/# ?¿

Last edited by Jinux75; 07-31-2017 at 04:39 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
So many newbie questions gadgets Linux - Newbie 3 04-02-2009 10:28 AM
a few newbie questions 46&2 Linux - Newbie 3 05-16-2004 09:41 PM
newbie questions G011um Linux - General 7 03-14-2002 09:56 PM
many questions from a newbie dirkduck169 Linux - Newbie 2 05-14-2001 05:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration