LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 12-12-2008, 01:19 PM   #1
yoojamu
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Rep: Reputation: 0
mkswap gives command not found error


Hi Freinds,

I am using oracle enterprise linux 5.2

I was trying to add some extra swap space. but when i use mkswap its giving me command not found error.

looking forward to your supporting

Thanks in advance
 
Old 12-12-2008, 01:30 PM   #2
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
you need to do it from the user "root"
 
Old 12-12-2008, 01:37 PM   #3
yoojamu
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I used su and changed to root then did it. Am i supposed to login as root and do it?
 
Old 12-12-2008, 01:53 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
On some distributions su root has a different PATH than logging in as root. Thus the mkswap command might be found as root but not as su root. Try logging in as root to run mkswap. Or you can find mkswap and give the full path to the command in su root.

--------------------
Steve Stites
 
Old 12-12-2008, 01:54 PM   #5
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
Quote:
Originally Posted by yoojamu View Post
I used su and changed to root then did it. Am i supposed to login as root and do it?
post the output of which mkswap from root
 
Old 12-12-2008, 01:59 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
su will still use the current users path environment
su - will use root's path environment.
 
Old 12-12-2008, 02:10 PM   #7
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
thanks for pointing that out, i just tried it and found you are right - usually inherits the ~ directory but i didnt know about the path :-)
 
  


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
error: Command Not Found dayalan_cse Programming 12 11-15-2006 11:59 PM
command not found error Deelk Slackware 12 04-23-2006 02:12 PM
command not found error cdsnithi Linux - Software 2 07-06-2005 12:26 PM
command not found error lordshipmayhem Linux - Newbie 4 06-28-2005 09:15 PM
c++ command not found error... ? Cheka Linux - Newbie 2 01-29-2005 03:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 11:09 AM.

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