LinuxQuestions.org
Visit Jeremy's Blog.
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-31-2017, 04:47 AM   #31
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.
Pitty for me that file is not a command. i type file -help or file --help but it says file: not found. I get question marks again what the difference would be between -help and --help. hmmm it probably is the tiny core distro i am using they stripped it down so some commands are not available is my guess...

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

Original Poster
Rep: Reputation: Disabled
hey i just found out i can do if and then statements on the command line, i need i better editor then vim anyone has a good idea. i would like one where i can use my arrow keys to navigate thru the lines when i want to change a line instead of this :a :d stuff. I know i'll search yahoo or duckduck or google

got it, nano no learning curve there :-p

Last edited by Jinux75; 07-31-2017 at 05:18 AM.
 
Old 07-31-2017, 05:32 AM   #33
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
Yay i made my first automatic program that does not do a lot, but it mounts my cdrom drive where i want, just by typing sh automatic.
haha

if [ -d "$/home/tc/test/cdrom" ] ; then
mount /dev/sr0 /home/tc/test/cdrom
else
mkdir /home/tc/test/cdrom
mount /dev/sr0 /home/tc/test/cdrom
fi

and it actually works, oh what fun this is, little steps i know but i can do more then before this weekend so i am proud on myself haha.

How would one make something like this while booting, that would be handy...

Last edited by Jinux75; 07-31-2017 at 05:33 AM.
 
1 members found this post helpful.
Old 07-31-2017, 07:17 AM   #34
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
Hey Jinux75 - congrats on your script !

You could (carefully ! ... read up on proper syntax ... again - improper syntax could leave you unable to boot your system ...) add a line to your /etc/fstab to automatically mount a readable optical disk at boot. There are other tools / methods - I'm sure other members will provide suggestions as well.

Cheers !
 
Old 07-31-2017, 08:00 AM   #35
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
The uncontrollable mouse thing is what happens when you are in need of SWAP, but have NONE. The system is going around ending things to stay afloat. With that little ram you need SWAP. And you might give up on running a GUI like X. Unless you go with a really OLD distro that was new when the laptop was young. Things have grown and the minimum specs for linux isn't what it once was, except on fewer and fewer botique distros. Gentoo is a common mention for embedded systems with similar specs. Not for the meek or new to linux types though.
 
Old 07-31-2017, 08:07 AM   #36
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
yes i could do that, but i made an install to the hdd and now when i reboot i get some error about no space on the device, so i have to install again. I think it would be better to take a more up to date laptop and then try again, because this 690mhz 191 mb 10gb laptop is killing me... later
 
Old 07-31-2017, 09:29 AM   #37
Jinux75
Member
 
Registered: Jul 2017
Location: The Netherlands
Distribution: Linux Mint, Ubuntu 20.04
Posts: 97

Original Poster
Rep: Reputation: Disabled
Ok i dropped the old 690 mhz fujitsu and am now using: inxi
CPU~Dual core Pentium CPU T4400 (-MCP-) clocked at 1200.000 Mhz Kernel~3.16.0-38-generic x86_64 Up~1:08 Mem~793.3/1873.2MB HDD~250.1GB(2.2% used) Procs~153 Client~Shell inxi~1.9.17

and i have man pages now :-)
 
Old 07-31-2017, 09:30 AM   #38
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,
Quote:
Originally Posted by Jinux75 View Post
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
Most systems do have the man available but if you do not then use; http://man.he.net/ for one of many online man access. Online man mount information. BTW, the command umount is the proper command not unmount.

If you have a '/etc/fstab' that provides the mount then by placing a valid CD/DVD in the device will cause a mount to the designated mount point.
Quote:
Just a few links to aid you to gaining some understanding;
Have fun!
Hope this helps.

Last edited by onebuck; 07-31-2017 at 09:31 AM. Reason: typo
 
Old 07-31-2017, 09:38 AM   #39
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,638
Blog Entries: 19

Rep: Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469
Quote:
Originally Posted by Jinux75 View Post
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 happens.
If you look more closely, you will see noauto under options. That stops the system trying to mount things like CDs automatically at boot when they might not be present.
Quote:
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?
mount /dev/sr0. You shouldn't need to specify a mountpoint, filesystem type or options because they are already there in fstab. That's what fstab is for!
Quote:
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.
It's umount, not unmount. Don't ask me why! If you mounted with mount /dev/sr0, you can unmount with umount /dev/sr0.
 
Old 07-31-2017, 12:31 PM   #40
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
Good AM Jinux75 Hope to see you back today, discovering all the fun_puzzles of Linux/Unix

I had a couple more thoughts, on readings, for the process of discovering&learning *nix:
Here, from web-searching my favorite keywords, I found something I recommend, for *nix 'bottom-up'
Here's a wise person's guidelines on using Internet Forums, which I loved, for s

Fyi, you can see here, how I similarly 1st marveled at all the possibilities of my Linux discovery
(tho I knew the OldUnix basic foundation concepts, from decades-ago, which you're discovering!)

Best wishes always! "Keep on, keeping on" I think the old saying goes

p.s. IF you have 'internet', you have infinite 'man pages':
in a web-search box, simply put: man <command>
Quote:
Originally Posted by Jinux75 View Post
and i have man pages now :-)
Keep the old "191 mb"'er, for just busybox (to avoid being seduced by easyGUI)!

Last edited by Jjanel; 07-31-2017 at 01:00 PM.
 
Old 08-01-2017, 07:11 AM   #41
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 Shadow_7 View Post
The uncontrollable mouse thing is what happens when you are in need of SWAP, but have NONE. The system is going around ending things to stay afloat. With that little ram you need SWAP. And you might give up on running a GUI like X. Unless you go with a really OLD distro that was new when the laptop was young. Things have grown and the minimum specs for linux isn't what it once was, except on fewer and fewer botique distros. Gentoo is a common mention for embedded systems with similar specs. Not for the meek or new to linux types though.
I made a linux swap partition, but i still have no clue how to tell it to use it.
 
Old 08-01-2017, 07:12 AM   #42
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,


Most systems do have the man available but if you do not then use; http://man.he.net/ for one of many online man access. Online man mount information. BTW, the command umount is the proper command not unmount.

If you have a '/etc/fstab' that provides the mount then by placing a valid CD/DVD in the device will cause a mount to the designated mount point.
Have fun!
Hope this helps.
Thanks for all the info links, i am reading them right now :-)
 
Old 08-01-2017, 07:22 AM   #43
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
If you look more closely, you will see noauto under options. That stops the system trying to mount things like CDs automatically at boot when they might not be present.

mount /dev/sr0. You shouldn't need to specify a mountpoint, filesystem type or options because they are already there in fstab. That's what fstab is for!
That is what fstab is for, yes but where does it come from, who is making it? the system ? does it look at the bios ? I see when linux is uncompressing /etc/fstab is configured, but how does it do that. Well ok I just take your word for it, it magically appears and is very handy.

But now i got rid of tiny core dsl etc. and am on mint. Now this GUI of mint is incredible, ms could learn something here. But the /mnt is empty while the hdd is mounted, because this is where the filesystem is at. So when looking at fstab, yes, with nano, i see: was on /dev/sda6 during_installation.
and then UUID= with a very long number ext4 errors=remount-ro 0 1
then it says

and swap was on /dev/sda1 during installation
and UUID= very long number none swap sw 0 0

so, how do i get in the directory that is my hard drive from the command line. Or where does it say it is linked to. Not /mnt and is it possible to access the swap ?

Last edited by Jinux75; 08-01-2017 at 07:28 AM.
 
Old 08-01-2017, 08:04 AM   #44
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
That is what fstab is for, yes but where does it come from, who is making it? the system ? does it look at the bios ? I see when linux is uncompressing /etc/fstab is configured, but how does it do that. Well ok I just take your word for it, it magically appears and is very handy. ... so, how do i get in the directory that is my hard drive from the command line. Or where does it say it is linked to. Not /mnt and is it possible to access the swap ?
Hey Jinux75. Nothing magical about fstab - the file is generated when you first install linux, based on the partitions detected by the system during installation (and/or the ones you asked to be created during installation). Thereafter, it can be edited as required (albeit, carefully ...).

Your main partition (hard drive, if you like), is mounted by fstab as "/" ... your root directory ( root as in the directory sense, not the super user sense ...). The /mnt directory ( ... or any empty directory for which you have the appropriate permissions, either already existing or one you create ...) can be used for mounting other partitions, media, either manually or with fstab.

As for swap, it is not user-accessible and is not meant to be. The system uses the space as virtual memory as needed.

I encourage you to read up on the way linux "mounts" partitions and media ... The "everything is a file" concept of linux is a bit hard for a habitual Windows user to get their head around at first.

Hope this helps.

Cheers !

Last edited by Rickkkk; 08-01-2017 at 08:09 AM.
 
Old 08-01-2017, 08:04 AM   #45
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,638
Blog Entries: 19

Rep: Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469Reputation: 4469
Quote:
Originally Posted by Jinux75 View Post
That is what fstab is for, yes but where does it come from, who is making it? the system ? does it look at the bios ? I see when linux is uncompressing /etc/fstab is configured, but how does it do that. Well ok I just take your word for it, it magically appears and is very handy.
For most distros, the installer makes it. It checks what disks you have and constructs a permanent fstab suitable for your system. Distros that work live in ram presumably use similar methods to create their own one-off version.
Quote:
But now i got rid of tiny core dsl etc. and am on mint. Now this GUI of mint is incredible, ms could learn something here. But the /mnt is empty while the hdd is mounted, because this is where the filesystem is at. So when looking at fstab, yes, with nano, i see: was on /dev/sda6 during_installation.
and then UUID= with a very long number ext4 errors=remount-ro 0 1
then it says

and swap was on /dev/sda1 during installation
and UUID= very long number none swap sw 0 0

so, how do i get in the directory that is my hard drive from the command line. Or where does it say it is linked to. Not /mnt and is it possible to access the swap ?
Are we talking about live Mint or an installed version? For any installed Linux, the root partition is mounted on /.

UUIDs (Universal Unique IDs) are used by many distros nowadays to identify disks, as they are permanent and unique. Whenever a filesystem is created on a partition, a random UUID is generated and stored in the filesystem's superblock.

Last edited by hazel; 08-01-2017 at 08:09 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 02:21 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