Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 3rd June 2012, 05:05 PM
Yora0 Offline
Registered User
 
Join Date: Jun 2012
Location: Germany
Posts: 148
linuxfirefox
Help me along my first steps in using Commands

I've been working Fedora for the past two days and getting much better with all kinds of things, but the most time consuming and exhausting part about any solutions is that I never have any clue how to use the Konsole.
I think I should have at least the basics before trying to fix all the other small issues I still have.

I tried "man mv" once, but I don't understand anything of it, because it already assumes that you know and understand all the basics about how Konsole works. If anyone can show me to a great introductory guide, that would be most welcome. Otherwise I have a huge number of particular questions, to which a direct reply would also help me a great deal along.

#0: What's the generic terms for using Konsole in Linux? I now that Ubuntu calls it Terminal, but the basics appear to always be the same. If I use google to search for an explaination for "mv" for example, what term should I use to get answers that work for any version of Linux? If I search for Konsole, I probably get only the Fedora sites listed, even though all the Ubuntu sites would also work.

In the late 90s, I still learned some very rudimentary basics of DOS, so the concept of a text based interface is not completely alien to me. So I start with the first thing that appears to be different in Linux:

#1: How do you move between folders? Is there something like "cd directory" and "dir" to show the content of the directory you are currently in?
I already learned that tilde can stand in place of "/home/user". And of course * stands for "anything".

Last edited by Yora0; 3rd June 2012 at 08:53 PM.
Reply With Quote
  #2  
Old 3rd June 2012, 05:11 PM
sea's Avatar
sea Online
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,600
linuxfirefox
Re: Help me along my first steps in using Konsole

Code:
mv SOURCE DESTINATION
mv $HOME/testfile          /mnt/some/folder/
mv testfile                ../other
mv ./some/path/testfile    ./existing-folder/new-filename
EDIT:
See at this forums top - links menu, there is a Linux Help.
Also the yellow link aside has some nice information.

A collection of some helpfull links can be found:
http://sea.hostingsociety.com/?p=Links&stc=
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle fedora-rawhide ; st iso dl-fed -respin && st iso usb

Last edited by sea; 3rd June 2012 at 05:16 PM.
Reply With Quote
  #3  
Old 3rd June 2012, 05:11 PM
Mariusz W Offline
Registered User
 
Join Date: Nov 2007
Location: Berkeley, California
Posts: 690
unknownmidori
Re: Help me along my first steps in using Konsole

Get any introduction to Linux and how to use the command line.
Reply With Quote
  #4  
Old 3rd June 2012, 05:37 PM
Yora0 Offline
Registered User
 
Join Date: Jun 2012
Location: Germany
Posts: 148
linuxfirefox
Re: Help me along my first steps in using Konsole

Quote:
Originally Posted by sea View Post
See at this forums top - links menu, there is a Linux Help.
Oh, this is nice. Learning something new with every sentence. Exactly what I've been looking for.
Reply With Quote
  #5  
Old 3rd June 2012, 06:14 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118
linuxchrome
Re: Help me along my first steps in using Konsole

First off, forget about trying to make a distinction between Konsole, Terminal, gnome-terminal, xterm and a long list of many others. They are all just a GUI X-server wrapper for running bash commands. They all run the same bash commands, the same way. Yes, there are differences between them in how the x-terminal window provides some functions, but that's not of much importance here if what you really need is to learn/understand basic bash commands.

Agreed. To a newcomer, many of "man command" pages leave a lot to be desired in making it clear just exactly what is the proper command syntax to use. Very few of them give you example syntax so you can see exactly how the command line syntax is structured in various situations. But once you get more experience with usage and man pages, it does become a bit clearer as to what the man page is telling you. Even with my level of experience using bash (and I almost never use a GUI file manager, but rather the command line) I still come across a man page now and then that leaves me saying..."WTF", and I have no clue.

My best advice is to use Google. Yes, besides "man command" typed into your terminal for the man page for whatever command, there are also several online bash command line reference sites, most of which are just copies in html format of what you see when you type "man command" in your terminal. But if you Google search using a term such as "how to move files using the mv command", you'll undoubtedly get a lot of links to sites that will give you working examples and better explanations.

The "mv" command can be pretty tricky at first to a new comer because the mv command is used to either rename a file or relocate a file, or both at the same time. And you can't do anything with commands that work on directories or files until you have a firm grasp on the Linux file system structure, so the very first thing you must learn is how the file system directory hierarchy is layed out and how to navigate the file system.

Everything starts with the root directory "/" (I'm not talking about roots directory, /root) and descends from there. The "ls" (list) command, by itself, lists the contents of your current working directory. The "pwd" (print working directory) command will show you the full path to what is your current working directory.

From your current working directory (lets say it currently /home/martin) you can either "ls" or "cd" (change directory) to any subfolder by simply specifying the directory name without having to give the "full" path.
Example:
Code:
BASH:~/-> pwd
/home/paul
BASH:~/-> ls
CEF-daily  Desktop  Documents  dosbox  Downloads  Music  Pictures  rpmbuild  src  Videos  work
BASH:~/-> ls Documents
Files  RPMS  SpecFiles  Tarballs
BASH:~/-> ls Documents/Files
Fixes  General  MaxPC  PDF  Xcel
And then to "cd" into the Documents/Files directory, simply:
Code:
BASH:~/-> cd Documents/Files
BASH:Files/-> ls
Fixes  General  MaxPC  PDF  Xcel
BASH:Files/-> pwd
/home/paul/Documents/Files
If you are not currently in your user home top directory, but want to go there, the "cd" command by itself will default to that directory. Use it to quickly return to your user home directory (/home/martin)
There are other bash shortcuts... "../" means cd up one directory. "../../" means change cd up two directories.
Code:
BASH:Files/-> cd
BASH:~/-> pwd
/home/paul
BASH:~/-> cd ../../
BASH://-> pwd
/
When "cd" to or "ls" a directory that is not an immediate sub-directory of your current working directory, then you need to specify the full path to it, beginning at the "/" directory.

When using the "mv" command to relocate (move) a file, specify the filename followed by the path to the directory where you want to file moved to. If the file is in your current working directory, use just the filename. It's it's somewhere else, specify the path to the file as well.

Use the TAB key for bash auto-completion. This will save a lot of time typing in the terminal. Type a partial path, then hit the TAB key. If what you already typed is unique, bash will complete the line, if it's not unique, hit TAB TAB, and bash will show you a list of all possible completions. This is especially useful when there are spaces in either directory or file names, or other "special" illegal characters which must be "escaped" (proceeded by a back-slash character).

DO NOT create directories or files in your user home directory as root. If you do, you will not have access to them as your regular user. If that happens, then you'll need to change to root (su, su - or sudo) and do a "chown" (change owner) of those root owned directories/files.

Hope this gets you on your way....

Last edited by PabloTwo; 3rd June 2012 at 06:19 PM.
Reply With Quote
  #6  
Old 3rd June 2012, 06:17 PM
Mariusz W Offline
Registered User
 
Join Date: Nov 2007
Location: Berkeley, California
Posts: 690
unknownmidori
Re: Help me along my first steps in using Konsole

From your posts, I infer that you are not concerned about Konsole, a terminal emulator belonging to the KDE bundle, but about how to use the command line in Linux. Take a look at

http://konsole.kde.org/

at

http://en.wikipedia.org/wiki/Linux_console

and at

http://linuxcommand.org/

to realise the difference.


In order to save us from confusion, I suggest you replace the word 'Konsole' in the thread title, in the thread tags, and in your posts to, e.g., 'command line'.
Reply With Quote
  #7  
Old 3rd June 2012, 07:35 PM
Yora0 Offline
Registered User
 
Join Date: Jun 2012
Location: Germany
Posts: 148
linuxfirefox
Re: Help me along my first steps in using Konsole

Yeah, both Konsole and Terminal are programms to make working with commands easier. The generic term "commands" was the first thing I was asking about.

However, I have one Konsole-specific question right now.

Using "su -" and loging in as root, I was able to move up to "/" and create the directory "/test".
With "ls -l", I determined the permission settings for the directory and using "chmod 777 test" I changed the permissions to "drw-rw-rw-."

Now I should be able to open the directory as a regular user in dolphin, but it says "Access denied".

Looking at "ls -" again, "test" is now highlighted in green (maybe the same green as tmp, not 100% sure).
What is this green highlight indicating?

And based on that, were can I find a guide to all the color codes used by Konsole? "Konsole color highlights" did not get me any useful results on google.



I did indeed use chmod 666. Changing to 777 did the trick. But isn't looking into folders "read"?

Last edited by Yora0; 3rd June 2012 at 07:38 PM.
Reply With Quote
  #8  
Old 3rd June 2012, 08:21 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118
linuxchrome
Re: Help me along my first steps in using Konsole

Really really really bad idea to name a directory or file "test". "test" is a bash command name.
Code:
BASH:~/-> which test
/usr/bin/test
A directory with "chmod 777" should show as "drwxrwxrwx", not drw-rw-rw", unless this is F17 using btrs filesystem which I know nothing about and things are "different" there. In some cases, such as a windows OS directory set to 0777, will show in the terminal with a green background.

I am not a KDE (Konsole) user, but normally x-term consoles use the color scheme as defined in the /etc/DIR_COLORS file. I'm only guessing that Konsole is taking it's color scheme from that file.

Last edited by PabloTwo; 3rd June 2012 at 08:29 PM.
Reply With Quote
  #9  
Old 3rd June 2012, 08:55 PM
Yora0 Offline
Registered User
 
Join Date: Jun 2012
Location: Germany
Posts: 148
linuxfirefox
Re: Help me along my first steps in using Konsole

Yes. Changing it to 700 removes the green coloring. Probably a waning indicator that the directory should have its permissions changed.
Reply With Quote
  #10  
Old 19th June 2012, 05:55 AM
Yora0 Offline
Registered User
 
Join Date: Jun 2012
Location: Germany
Posts: 148
linuxfirefox
Re: Help me along my first steps in using Konsole

When I am in a command terminal and decide to login as root by su -, I always end up in /root. Is there a way to immediately get back to the directory I was before using su -?
Reply With Quote
  #11  
Old 19th June 2012, 11:46 AM
secipolla Offline
Registered User
 
Join Date: May 2011
Posts: 700
linuxfirefox
Re: Help me along my first steps in using Konsole

Quote:
Originally Posted by Yora0 View Post
When I am in a command terminal and decide to login as root by su -, I always end up in /root. Is there a way to immediately get back to the directory I was before using su -?
I use the sakura terminal emulator and it doesn't behave like that so maybe check konsole's options to see if you can change that behaviour.
Reply With Quote
  #12  
Old 19th June 2012, 10:41 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118
linuxchrome
Re: Help me along my first steps in using Konsole

If you use just "su", without the space and hyphen, you will remain in your current directory. But depending what it is you want to do as root, this way of switching to root may or may not allow you to do what it is you want to do as root.
Reply With Quote
  #13  
Old 19th June 2012, 11:06 PM
William Haller Offline
Registered User
 
Join Date: Jul 2005
Age: 52
Posts: 1,013
linuxchrome
Re: Help me along my first steps in using Konsole

Another shortcut that is useful when changing directories is

cd -

This takes you back where you were before your last change directory. It won't help across a su, but is really handy in generally moving around.

Another nice syntax feature is putting () around a set of commands with a cd. This lets you go someplace, execute the commands, and then come back.

(cd /etc;nedit hosts.allow)

Clearly, you could just use

nedit /etc/hosts.allow

but I used that as an example.
Reply With Quote
  #14  
Old 20th June 2012, 04:42 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,689
windows_7chrome
Re: Help me along my first steps in using Konsole

Quote:
Originally Posted by William Haller View Post
Another shortcut that is useful when changing directories is

cd -
You might want to check-out the Bash pushd and popd commands if you do lots of back-and-forth directory changing. As with these though, it'll only work within a single shell instance (not across su).
Reply With Quote
Reply

Tags
how to, konsole, steps

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
Too many brightness steps sarevokphd Using Fedora 0 25th September 2011 02:30 PM
First steps after New install of FC4 marooned21 EOL (End Of Life) Versions 4 15th March 2006 04:22 AM
Small Steps.. b3nny Using Fedora 1 6th October 2005 06:14 PM


Current GMT-time: 02:07 (Sunday, 19-05-2013)

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