LinuxQuestions.org
Help answer threads with 0 replies.
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 08-13-2009, 09:22 PM   #1
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Rep: Reputation: 16
Cmd Line help


When I press alt-ctrl-f2 or some other f# combination, I go to a cmd line interface and no longer have the gui. I have been experimenting with commands like rm ls and cat sometimes when i put something like cat in and then follow it with the file, the starting date which says something along the lines of


$ john/johnnyhome/... and so on

disappears and I can no longer input any more commands. How do i make it reappear?
 
Old 08-13-2009, 09:33 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
I'm sorry - I don't understand.

Is your question "How do I get back to the GUI after pressing Ctl-Alt-F1?"
<= the answer is usually "Ctl-Alt-F7".
But the Sure Thing is try "Ctl-Alt-ANYthing" until you find the winning combination.

Or is your question "Why is 'cat SOMEFILE' messing up my screen?"
<= The answer is "Gee - it *shouldn't*'
Try a known good text file, like:

cat /etc/hosts

'Hope that helps .. PSM
 
Old 08-13-2009, 09:35 PM   #3
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Original Poster
Rep: Reputation: 16
what i means is if i press alt-ctrl-f2 and then type a certain command e.g. cat *fileName* it made the cmd line disappear and it wont reappear. basically in the cmd line interface, if i press enter i get a blank line and i dont get the $ sign followed by the pathway.
 
Old 08-13-2009, 09:45 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Try
Ctrl-C
reset<enter>
 
Old 08-13-2009, 09:56 PM   #5
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Original Poster
Rep: Reputation: 16
Thank you, that did just the thing.
 
Old 08-13-2009, 11:32 PM   #6
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. If you type "cat /etc/hosts", you should see the contents of your /etc/hosts" file (a text file), and you should get your prompt back immediately.

2. If you type "cat" and hit enter (with no arguments), then the "cat" command will appear to "hang". What it's actually doing is waiting for input to be redirected to it from "stdin" (Unix-speak for "standard input", typically you typing something at the keyboard). <Ctl-C> (interrupt program) is one way to break out. <Ctl-D> (signal "end-of-input") is another, more benign way.

3. It sounds like whatever you typed after "cat", caused it to behave like "cat" (with no arguments). I encourage you to try the "cat /etc/hosts" experiment, and compare it with your first experience. Then try "cat" with any other convenient text (for example, ".profile", in your home directory).

'Hope that helps .. PSM
 
Old 08-14-2009, 12:00 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Another thing to watch is only cat text type files, not binary executables. The way to check is

file <filename>

which will tell you if its a text type file. Trying to cat a binary will screw up the display.
Also, instead of using ctl-alt-f#, open up a cmd terminal (xterm/gnome terminal).
You can have lots open at the same time and still see the GUI.
 
Old 08-14-2009, 02:40 AM   #8
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Original Poster
Rep: Reputation: 16
thanks!
 
  


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
Cmd line bittorrent quesiton Jukas Linux - Software 2 10-27-2005 03:55 PM
Get pkgs (xFree86) installed from cmd line mattp Debian 2 10-02-2005 01:16 PM
cmd line send attachment? jedimastermopar Linux - General 2 06-16-2005 12:51 PM
Best distro for cmd-line webserver Seft Linux - Newbie 4 11-15-2003 03:32 AM
booting then to cmd line..... Why not to GUI?? Ax787 Linux - Newbie 1 10-28-2003 10:45 AM

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

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