LinuxQuestions.org
Review your favorite Linux distribution.
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 10-27-2016, 01:58 PM   #1
tk61951
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Rep: Reputation: Disabled
CLI commands tutorial?


Is this website not meant for newbies? I am learning how to use linux via Ubuntu 14.04LTS, and have been able to figure out how to do minor processes (Getting wifi connected via lspci and there was some probe command i had to use, getting a grasp on downloading packages in the terminal, mounting a usb drive. All thanks to google I got this far). I have a couple of books I got from my college real cheap but they all assume the reader already knows how to use linux.

The books are:

Linux Administration a Beginner's Guide (sixth edition) by Wale Soyinka
Guide to UNIX using LINUX by Jack Dent and Tony Gaddis
Red Hat Linux Network Management Tools by Steve Maxwell
Guide to Linux Networking and Security by Nicholas Wells
Linux+ Guide to Linux certification by Jason W. Eckert and M. John Schitka

They were $1 a piece so I wasn't going to pass them up.

I am trying to do everything in the command terminal, I load firefox in the terminal and go from there. I can do MS-DOS batch scripting at a basic level (menus, directory traversal, other batch script calls, append existing files, if statements), so I figure I have an idea of the logic of how to do things, but apparently not much.

I am skimming the tutorials on here, and figured that the Vim would be a good place to start, and am getting stuck at the beginning. In the tutorial the author has a section called "Basic Command Use:" and it's blank, and then it notes *From this section on, it's assumed you have basic CLI knowledge and know how to use basic commands*

is there a tutorial on basic commands? Apparently I don't know enough. I know:

mkdir
rmdir
pwd
cd..
chmod
q usually quits

The reason I am making this post isn't about vim but more about me not knowing how to get out of certain "loops/bugs" I seem to find myself in.

A good example would be right now, I type Firefox in the terminal and the browser loads, but when I go back to the terminal, on the next line it says "vector smash protection is enabled." and it's like I am in an editor, and can't get out of this process. everything I type just goes in and enter just drops me down the next line. Of course I can just "x" out of the terminal, but there has to be something I can type in to get back to the $ Username command syntax.

Crap, just tried ctrl+c just now and it killed the terminal along with this firefox window. thankfully this post was still saved when I restored the browser.

Could someone tell me what tutorials are good to get started in figuring all of this out? I just really find myself in these loops in the terminal where I am somehow in an editor of some sort that I cannot get myself out of. I figured some combination of q like ctrl+q or shift+q would get me out, but doesn't seem to work. I really don't want to do ctrl+c because it kills the terminal altogether, or is that just how things are done in linux and will have to just accept it? Sorry for long post, thanks LQ!
 
Old 10-27-2016, 02:36 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
First:
For most commands in UNIX/Linux there are "man" pages with "man" being short for "manual".

If you type "man ls" you'll get the manual for the ls command.

If you type "man mkdir" you'll get the manual for the mkdir command.

If you type "man -k <word>" you'll even get a list of man pages that contain the word you list so may find some that help with concepts rather than just commands. That is to say many C libraries, concepts and other things have man pages - not just commands.

Second:
There are literally hundreds of tutorials on the internet. Just doing a web search for something like "bash tutorial" or "linux storage tutorial" is apt to get you multiple hits.

Finally:
In answer to your question this site is mainly meant for asking specific questions when you get stuck or have an issue (e.g. I was installing this but when I got to step 5 I got this error...) or when you don't know how to get started (e.g. I'd like to find a way to keep to folders on different computers up to date with the same files.)
 
Old 10-27-2016, 02:57 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,831

Rep: Reputation: 5969Reputation: 5969Reputation: 5969Reputation: 5969Reputation: 5969Reputation: 5969Reputation: 5969Reputation: 5969Reputation: 5969Reputation: 5969Reputation: 5969
These might help you get started. I will assume others will post their favorites.

http://tille.garrels.be/training/tldp/index.html
https://bash.cyberciti.biz/guide/What_is_Linux_Shell
http://tldp.org/LDP/Bash-Beginners-Guide/html/

In a nutshell when you run a command the terminal window becomes the parent and the command the child. If you kill (ctrl-c) the parent the child dies. Once firefox is running any output you see was typically generated by the program and when you close firefox you will see a command prompt. If you add a & at the end (i.e firefox &) then it will be moved to the background ( a topic for another day ) and you will see a prompt immediately.
 
Old 10-27-2016, 03:39 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
running firefox in the terminal, it stays in the terminal and you get to see all of the messages passed ... to seperate it from the terminal add & after the command firefox, you'll find if you do this to all of the GUI apps you start you can run more then one app out of the same terminal.

example:
Code:
gparted &
Code:
firefox &
Code:
geany &
geany is a gui text eitor and there are others too you can use to script in as well.
 
Old 10-27-2016, 04:42 PM   #5
linux4evr5581
Member
 
Registered: Sep 2016
Location: USA
Posts: 275

Rep: Reputation: Disabled
The Bunny Books (also called visual quickstart guide) are IMO the best resource as it's aimed towards beginners, and teaches everything you need to know. It kind of preps you for administration.. But its 50$ I think... To fix issues with your terminal you can try stty sane or reset (which is covered in the book)

Last edited by linux4evr5581; 10-28-2016 at 10:41 AM.
 
Old 10-27-2016, 08:39 PM   #6
pholland
Member
 
Registered: Jun 2015
Posts: 86

Rep: Reputation: Disabled
Book: The Linux Command Line. Free download. http://linuxcommand.org/tlcl.php
 
Old 10-27-2016, 11:01 PM   #7
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,386
Blog Entries: 3

Rep: Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775
In addition to the above recommendations, you can get a quick overview of what's on your system using "apropos" and piping the output into other programs for further processing and display:

Code:
apropos -w '*' | awk '$2 == "(1)" || $2== "(8)"' | sort -u | less
apropos -w '*' | awk '$2 == "(1)" || $2== "(8)"' | sort -u
apropos -w '*' | awk '$2 == "(1)" || $2== "(8)"'
apropos -w '*'
You'll see that there are too many for one to cover for all occasions in advance. So if you approach it more as you would any other scripting language with a just-in-time model, it will be easy to find your way around using the manual pages.

Code:
man apropos
man awk
man sort
man less
man man

Last edited by Turbocapitalist; 10-27-2016 at 11:02 PM.
 
Old 10-27-2016, 11:12 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,375

Rep: Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755Reputation: 2755
This is a good cli tutorial http://rlworkman.net/howtos/rute/, but, as above, for the 'get into a loop' qns, you need to post specific qns here and as you solve each one, you'll develop the knowledge to be able to solve them yourself.

Its not possible for a book to anticipate every issue that can occur
If it could, a lot of us would be out of a job
 
Old 10-29-2016, 03:46 PM   #9
tk61951
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for the references, I am looking into them, and it's been a major help! As for that error I ran into after I ran firefox, what does that mean? the "vector smash protection enabled". A google search took me to a thread of jargon that is very difficult for me to understand. Is there a layman's version to explain it? It doesn't happen as often as I think it does, it's just really annoying when it does. I will start using the ampersand when I run GUI programs to alleviate my suffering
 
Old 10-29-2016, 04:05 PM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Well...

$ help
$ man man
$ man hier

Most everything that you need to know about your computer is already on your computer once you're in an operating system. In man there's often a "see also" section towards the end. There's a project called tldp with a site tldp.org which gives most newbie information. Also known as The Linux Documentation Project. The problem with documentation though is that by the time you're done writing it, it's already out of date.
 
Old 10-29-2016, 04:15 PM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
In addition to:

http://tldp.org/

There's:

http://www.gnu.org/

And the more useful / searchable:

http://www.gnu.org/manual/
 
Old 10-30-2016, 01:27 AM   #12
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,386
Blog Entries: 3

Rep: Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775Reputation: 3775
Quote:
Originally Posted by tk61951 View Post
Thanks for the references, I am looking into them, and it's been a major help! As for that error I ran into after I ran firefox, what does that mean? the "vector smash protection enabled". A google search took me to a thread of jargon that is very difficult for me to understand. Is there a layman's version to explain it? It doesn't happen as often as I think it does, it's just really annoying when it does. I will start using the ampersand when I run GUI programs to alleviate my suffering
It's one of the mitigation techniques to prevent crashing or exploiting the program via 'hostile' data. In this case the mitigation method being enabled is stack smashing. It's just informing you since it is a new method for some programs and it does not yet go without saying that it is in use. You'll probably want to hear from a real programmer for a proper explanation of the other problems a very large, very complex program can get into that have to be planned for.

About the ampersand ( & ), if put after a program name, it makes that program's process(es) run in the background so you can continue using the shell as normal in the foreground. Since the program is still running, you will still get any output to stderr or stdout that it might normally make. You can look in the manual page for "bash" for the built-in job control commands "jobs", "fg", and "bg". I recommend taking a quick look at process management. If you want to run multiple programs at the same time or on another machine and have them continue while you are logged out, then this is the rabbit hole to enter.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Where are hplipopensource's cli commands? rlynwood Linux - Software 5 07-15-2016 02:46 PM
LXer: Tutorial: An Introduction to Linux CLI LXer Syndicated Linux News 0 04-07-2009 08:20 PM
automation of CLI commands using python bharatbsharma Programming 1 03-18-2008 02:13 AM
help in linux commands in cli.. jaepi Linux - Newbie 9 04-27-2007 01:31 PM
Help on cli commands? bruno buys Linux - Software 2 08-15-2004 10:35 AM

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

All times are GMT -5. The time now is 09:14 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