Fedora Linux Support Community & Resources Center
  #1  
Old 28th April 2012, 08:16 PM
nicholasarchamb Offline
Registered User
 
Join Date: Apr 2012
Location: Georgia, USA
Posts: 2
macoschrome
Help with the Terminal

I know this is a beginner's question, but when I go into the terminal and I am typing a command, i never really know how or why certain arguments work and what the rules are.

An example is that i just realized that I can edit administrative files in gedit if I go into the terminal, become root, then enter gedit -s file.txt

This really was a lucky guess because when i look at the help lists, all of the commands and augments(is that what they are called?) just confuse me.

Can anyone help me out?
Reply With Quote
  #2  
Old 29th April 2012, 01:30 AM
goodfella Offline
Registered User
 
Join Date: Mar 2012
Location: SFBay Area
Posts: 81
linuxfirefox
Re: Help with the Terminal

Look at "man" or "info" files.

Type: man gedit

or

Type: info gedit
Reply With Quote
  #3  
Old 29th April 2012, 02:00 AM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
linuxfirefox
Re: Help with the Terminal

When you launch another program from within a terminal, the new program will start with the same user permissions as you have in the terminal. So if you open a terminal and start gedit as your normal non-root user gedit inherits those permissions.

If you su to root then launch gedit, gedit will run as root and be able to modify files that your normal user account cannot.
__________________
======
Doug G
======
Reply With Quote
  #4  
Old 29th April 2012, 03:39 AM
AlanSac Offline
Registered User
 
Join Date: Mar 2012
Location: Sacramento CA
Posts: 26
linuxfedorafirefox
Re: Help with the Terminal

Everyone was a beginner at one time, so don't worry. The bar at the top of the Fedoraforum contains "Linux Help" when you click on it, you get a lot of information, scrolling further down, you find links to several sites. Good ones to explore are "Introduction to Linux" and Linux.com (click on tutorials and scroll down to new user
guides. I also like the CSU Fresno website. Click on Fedora 14 and you can pick up some tips and become more comfortable with a terminal.

You will notice similarities between many commands and options. For example, uname -r will give you your linux version.

Hope this helps!
Reply With Quote
  #5  
Old 29th April 2012, 04:25 AM
nsnbm Offline
Registered User
 
Join Date: Dec 2007
Location: Australia
Posts: 416
linuxfirefox
Re: Help with the Terminal

Hello nicholasarchamb,

The arguments to a command are sometimes called switches, because they switch on or off certain functionality.
As a simple example which you may well be familiar with,

ls -al

has 2 arguments which are placed after the minus sign. The letter "a" tells the command "ls" to list all files and the letter "l" tells the command "ls" to list the files in long format. Most commands use the minus sign for their arguments, but not all. As mentioned above, the man pages provide the details, but many man pages are written in a dense style with little regard to beginners' levels of understanding so that can be a bit daunting to read. As one gets more experienced though, they become invaluable because one simply can't remember the sheer volume of data one might need to run their system. Ben.
Reply With Quote
  #6  
Old 2nd May 2012, 11:43 AM
Mariusz W Offline
Registered User
 
Join Date: Nov 2007
Location: Berkeley, California
Posts: 690
unknownmidori
Re: Help with the Terminal

Quote:
Originally Posted by nsnbm View Post
Hello nicholasarchamb,

The arguments to a command are sometimes called switches, because they switch on or off certain functionality.
The command line arguments are arguments to a command, while 'switches' (otherwise known as 'flags', or 'command options') -- are the modifiers that modify the default command. The difference between the two is crucial and in order not to confuse beginners it is advisable to use appropriate terminology.
Reply With Quote
  #7  
Old 2nd May 2012, 12:37 PM
nsnbm Offline
Registered User
 
Join Date: Dec 2007
Location: Australia
Posts: 416
linuxfirefox
Re: Help with the Terminal

Hello Mariusz W,

Thank you for that clarification. Hopefully the original poster is now better informed after your post. Ben.
Reply With Quote
  #8  
Old 2nd May 2012, 12:57 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,997
linuxfirefox
Re: Help with the Terminal

A lot of times, the standard --help option is really good, the man page can be too much detail

EX:
Quote:
gedit --help
(shows a list of all the options and a short description of their usages and purpose)
Reply With Quote
  #9  
Old 2nd May 2012, 01:34 PM
nsnbm Offline
Registered User
 
Join Date: Dec 2007
Location: Australia
Posts: 416
linuxfirefox
Re: Help with the Terminal

Hello Mariusz W again,

Just as a follow up to use of the word "switch" I refer you to the following reference:

Cornes P 1997 The Linux A-Z. New York: Prentice Hall.

On page 14 the author writes: " There are many occasions when entering a command where you will either want the command to perform some extra action beyond the default function or where you will want to suppress some part of the command's normal operation. In these cases what you need to do is to pass command line switches into the command to switch on (or off) the functionality you require. In order to provide a degree of consistency the normal way to pass switch values to a command is to use a hyphen (-) before the switch itself to signify that this is a switch and not just a normal command parameter (such as a file name fo example)."

Of course the word "switch" has a number of meanings and references depending on context but the author here is referring to what is alternatively called "arguments."

In the reference:

Kernigan B W & Pike R 1984 The Unix Programming Environment. Englewood Cliffs, NJ: Prentice Hall

the authors refer to command line arguments as "options" as well as "arguments."

Language is a wonderful thing really. I hope that my original post had enough of a context and description which was relevant to the query and comprehensible to the original poster, and hopefully helpful in its detail. Ben.

Last edited by nsnbm; 2nd May 2012 at 02:15 PM. Reason: added information
Reply With Quote
Reply

Tags
command line, fedora 16, help or advices, terminal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lower case x in terminal window opens a new terminal window. mollcons Using Fedora 0 6th March 2011 09:19 PM
FC6:gnome-terminal: error creating the child process of this terminal mnisay Using Fedora 3 12th February 2007 10:04 PM
SSH Launcher "Pseudo-terminal will not be allocated because stdin is not a terminal." kai4785 Using Fedora 5 28th August 2006 01:56 PM
gnome terminal vt220 terminal keyboard mapping gregsheu Using Fedora 0 15th May 2006 06:54 PM


Current GMT-time: 16:07 (Wednesday, 23-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat