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 01-17-2015, 11:02 AM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Rep: Reputation: Disabled
Ubuntu directories


Hi there. I have Ubuntu 14.04 installed. Actually I have been doing a lot of work in this OS for about a year. The thing I cannot still comprehend is how to find files I installed. In this particular case I need glut.h for g++ compiler. So I go here, do this command;

Code:
sudo apt-get install freeglut3-dev
And find out that I already have the newest version (which I have suspected since I recall installing it).

So, the next step is to find the glut.h file and reference it with #include command. I cannot find it anywhere. This website says it has to be here:

Code:
/usr/lib/x86_64-linux-gnu/libglut*
Why's the asterisk? Is it a footnote or part of the code?

I don't seem to have /usr/ directory. I cannot find it anywhere.

How does Ubuntu directory work?

Thanks, - A.
 
Old 01-17-2015, 11:25 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You can use find command for searching.

Code:
find / -type f -name "glut.h"
 
Old 01-17-2015, 11:32 AM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Most C header files would be in /usr/include ... libraries are in lib.
 
Old 01-17-2015, 12:12 PM   #4
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Original Poster
Rep: Reputation: Disabled
alex@alex-....:~/GFORTRAN-APPS/SPHERE-DESIGN$ find / -type f -name "glut.h"
find: `/run/udisks2': Permission denied
find: `/run/lightdm': Permission denied
find: `/run/cups/certs': Permission denied

Why is it so? I am the administrator on this machine. I installed this OS. I also think veerain misdialed the command. It seems to be:

Quote:
findg / -type f -name "glut.h"
The answer: No such file or directory.

This I also got:

Quote:
No command 'find:' found, did you mean:
Command 'findg' from package 'ncl-ncarg' (universe)
Command 'find' from package 'findutils' (main)
Command 'findv' from package 'polylib-utils' (universe)
find:: command not found
I also tried this:

Command 'find' from package 'findutils' (main)

Quote:
sudo apt-get install findutils
It is already there. Nothing was installed.

Where is the /usr/ directory?

Last edited by AlexBB; 01-17-2015 at 12:18 PM.
 
Old 01-17-2015, 12:19 PM   #5
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Original Poster
Rep: Reputation: Disabled
Where is the /usr/ directory?

Last edited by AlexBB; 01-17-2015 at 12:33 PM.
 
Old 01-17-2015, 03:49 PM   #6
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Original Poster
Rep: Reputation: Disabled
OK, I just installed Qt library or whatnot. Then I issued some commends I found here. See what happened:

Quote:
alex@.....:~/GFORTRAN-APPS$ which qmake
/usr/bin/qmake
alex@alex....:~/GFORTRAN-APPS$ qmake -version
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/i386-linux-gnu
It tells me that the library is in /usr/ subdirectory. Where is it? Why is it such a crazy mystery? I cannot find /usr/ anywhere.
 
Old 01-17-2015, 06:01 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
Why's the asterisk? Is it a footnote or part of the code?
It means to find and file in that directory beginning with libglut, so if you had a libglut1, libglut2, etc. they should all show.

Quote:
Where is the /usr/ directory?
In the terminal type: ls / That will show you all the directories in the root of the filesystem including usr.
If you are in a filemanager, use the up arrow to get to the root of the system. There are standard directories on Linux and they are listed under / alphabetically.

Run the find command as root, preface it with sudo. The prompt in your earlier post (#4) clearly shows you are running it as a normal user.
 
1 members found this post helpful.
Old 01-17-2015, 06:50 PM   #8
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Original Poster
Rep: Reputation: Disabled
Thank you. Very good. It is now working. A.
 
Old 01-18-2015, 07:34 AM   #9
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
For finding files on the whole filesystem locate is very useful. You may need to install it first
Code:
sudo apt-get install locate
To be able to start using it first needs to create an index of your hard drive. It does that automatically through cron, but you can start the process right away by typing
Code:
sudo updatedb
This may take a while, but once that is done you can simply type e.g.
Code:
locate glut.h
You'll find that it is faster then find when you search the whole disk and I personally also think it's easier to use if you are not used to the find syntax
 
Old 01-18-2015, 11:22 AM   #10
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Original Poster
Rep: Reputation: Disabled
Cherry 2000 :-), sorry, Joe_2000, thank you. I used the first command and it installed locate as was reported. Locate works now. - A.
 
  


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
LXer: Mounting Remote Directories With SSHFS On Ubuntu 11.10 LXer Syndicated Linux News 0 12-06-2011 02:50 PM
LXer: What do Different Directories mean in Ubuntu LXer Syndicated Linux News 0 10-07-2011 01:20 PM
How to grant permission and access to directories using ubuntu? JCole123 Linux - Newbie 4 07-14-2010 10:50 PM
LXer: Encrypted private directories coming to Ubuntu LXer Syndicated Linux News 0 08-10-2008 10:00 AM
How to go into some directories in UBUNTU from 'My Computer' EasyLife Ubuntu 2 08-03-2008 08:20 AM

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

All times are GMT -5. The time now is 12:35 PM.

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