New to linux, Please help!

readcoty

New Member
Joined
Feb 16, 2021
Messages
3
Reaction score
1
Credits
37
I am new to linux, currently I am taking CSN to learn the linux operating system. Everything is virtual so any questions we basically have to find out for ourselves. So i thought I would come here and see if I could get any help understanding The lab I am working on is this:
We can use the "file" command to get this information. Enter:

$ file /usr/bin/aspell
This gives file information about the program "aspell". Notice it's an ELF 64-bit LSB executable ... this just means it's a compiled program.

What type of file is /.bash_history? ___________________________________________

How about /etc/.ssh? ___________________________________________



9. The "echo" command and environment variables. The echo command outputs a string to standard output. For instance, enter

$ echo I am a linux god.

In addition to this, we can also output the contents of certain "environment" variables. The two that I'd like you to know are:

$HOME (note the dollar sign and capitalization -- displays your home directory), and $PATH (displays the directories in which to look for commands).

Enter:

$ echo My Home Directory is $HOME

$ echo $PATH
Question -- enter the command that will display the contents of the "$TO" variable (capital "Tee Oh" )

What does the $TO variable contain? ___________________

I am trying to use the file command to get information about a certain program first being aspell. Then as you can see he asked for the other two. when i try and run the file command it gives me an error and says its not in the directory. Any help would be greatly appreciated. Then also I am confused on this $TO variable and how to figure out what it contains? I understand when I run echo $PATH, I am just a bit confused on the $TO. Thank you for any help and input.
 


What Linux distro that you are using? If you are just getting started, using either Ubuntu or Linux Mint is the easiest path because if you have any problems, you can simply search on Google and find your answers there.
 
I am using ubuntu, this is a lab for a class that i am taking that is specifically for learning ubuntu. I have searched all over and get results all over the place which led me to try here.
 
As you see the 'file' command returns info about a file. Do 'ls /usr/bin/aspell'. If you get the same error it means that the file 'aspell' is not in the 'usr/bin' directory. His question seems to assume that it should be.
For your other questions, you should find a book or do some googling about linux environmental variables.

keith
 
Last edited:
There should be a space there, Keith. :)

Code:
ls /usr/bin/aspell

@readcoty welcome to linux.org :)

You are NOT typing in the $ , are you?

For me, in Elementary at the moment (based on Ubuntu) I get (my comments are preceded with a #)

Code:
chris@elementaryOS-Hera:~$ file /usr/bin/aspell

# I get the following

/usr/bin/aspell: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=2b9c8b07de40923f6104960ad4ecb052c2a85e4f, stripped

Chris Turner
wizardfromoz
 
We can use the "file" command to get this information


so lets use it to get info on .bash_history notice the "." at the start


.bash_history is in my home folder, with normal navigation you won't see it, unless you tweak /tick "show hidden files" .


output of file .bash_history:

bash-5.0$ file .bash_history
.bash_history: ASCII text


i.e its a text file in ASCII (American standard code) it can be opened with for example Kate text editor.

i have aspell and it is indeed located /usr/bin

$PATH is a variable holding where system should look for executable


eg /usr/bin is in $PATH

echo is a command to "echo" out what $PATH contains. I have no idea what $TO is and its not in my $PATH
 
What does the $TO variable contain?
Do
Code:
echo $TO
What does it contain? You need to study, otherwise you'll learn anything if we give you the answers. There are plenty of resources on the web; books, videos, tutorials, websites dedicated to teach Linux to people who want to learn it. So read, watch and learn, you'll see how gratifying it is when you realize for yourself that
Code:
echo $TO
gives the same result that
Code:
echo $NOTHING
:)
 
trouble is often OP's don't give the full Monty , so its possible TO was set earlier on a previous question and before PC was powered down?

eg

bash-5.0$ TO="hello world"
bash-5.0$ echo $TO
hello world
bash-5.0$
 
Thank you, I appreciate all the help and feedback. I am still learning so any information is very much appreciated! All has been very helpful
 

Members online


Top