LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-15-2016, 12:07 PM   #1
RacingFan3139
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Rep: Reputation: Disabled
Accessing the root@desktopX Directory


Hello,

I am completely new to Linux and I need some help. I know how to successfully enter into the root directory for the server, however, I am not sure on how the root directory for the desktop. Therefore, what command(s) should I use to access the desktop's root directory?

Thanks in advance,
RacingFan3139
 
Old 02-15-2016, 12:13 PM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Welcome to LQ!

Please describe in more detail what you are trying to achieve and why. People new to Linux often do not realize there are number of ways to get job done in Linux, things that are impossible in Windows are possible in Linux. So describing the goal instead of asking how may lead to surprising solutions.
 
Old 02-15-2016, 12:29 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
I don't understand the question. What is "desktop's root directory"?
 
Old 02-15-2016, 12:38 PM   #4
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,159
Blog Entries: 10

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
/root/Desktop doesn't exist until root logs in graphically.
Something that is generally discouraged.

Most servers don't have a GUI, generally speaking, so "desktop's root directory" is ambiguous.
And being "completely new to Linux", is a Red Flag.

Why are you asking?
Please elaborate and cite your references.

Last edited by Habitual; 02-15-2016 at 12:39 PM.
 
Old 02-15-2016, 02:04 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,916

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
Quote:
Originally Posted by RacingFan3139 View Post
Hello,
I am completely new to Linux and I need some help. I know how to successfully enter into the root directory for the server, however, I am not sure on how the root directory for the desktop. Therefore, what command(s) should I use to access the desktop's root directory?
I am going to take a guess, and assume you mean "How do I log in to the GUI/Window manager as root on the console?"

Short answer is: you don't...it's disabled for VERY GOOD SECURITY REASONS. As you're new to Linux, be aware that you should *NEVER* log in as root (or even ASSUME root with "su -"), unless you have an excellent reason for doing so. Treat the root account like a loaded gun.

Longer answer: you CAN, but how you enable that access depends on the version/distro of Linux and the window manager/login manager you're using. While it CAN be modified, it isn't simple (usually), and that takes you back to "Don't EVER LOG IN AS ROOT"
 
Old 02-15-2016, 02:17 PM   #6
RacingFan3139
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
I apologize about my post. I should have been more clear on my question. I am learning Linux for the first time by taking a course that is provided by the RHA (Red Hat Academy). What I am trying to do, or the goal of this assigned practice, is to configure a host name on the desktop's root file, as seen in the attachment.

Picture Note: In the attachment, I am assuming that the letter X is my foundation number.

As a result, I was wondering how I can access the desktop's root file in the terminal and be able to set the provided host name on the system.
Attached Thumbnails
Click image for larger version

Name:	Root at Desktop.png
Views:	18
Size:	13.2 KB
ID:	20848  
 
Old 02-15-2016, 08:00 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Still doesn't make sense.

Please define a couple of things for me if you would, because I think there's a language problem here:
1) "desktop"
2) "root file"
 
Old 02-15-2016, 08:48 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,333
Blog Entries: 12

Rep: Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729Reputation: 2729
What distro/version are you using and what have you tried so far?

As general information, hostnames are commonly stored in a file in the /etc directory. The exact name and format of the file(s) in question can vary slight depending on the particular distro.

You might want to take a look at this, if you have not already done so: http://www.linuxquestions.org/linux/...Ask_a_Question
 
Old 02-15-2016, 09:01 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,930

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
The desktop has nothing to with the hostname. The hostname can be anything but typically is a fully qualified domain name.

http://www.cyberciti.biz/faq/rhel-re...tname-command/

Last edited by michaelk; 02-15-2016 at 09:04 PM.
 
Old 02-15-2016, 09:14 PM   #10
RacingFan3139
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
The Linux distro/version that I am using in the course is Red Hat Enterprise Linux Server 7.0.

On the other hand, however, I think I figured it out. On the home screen, there are 4 icons: Home, Trash, View Server and View Desktop. I clicked on View Desktop and signed in. After signing in, I right-clicked the home screen, went to Open in Terminal and used the su - command in the terminal to access root. As a result, I believe that I am now able to finish the question I provided earlier.
 
Old 02-15-2016, 09:20 PM   #11
BW-userx
Senior Member
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Void Linux / Slackware 14.2
Posts: 2,062

Rep: Reputation: Disabled
if you right clicked open terminal here that is just where you are at, the directory is desktop,
cd enter to get back home where you belong.

for hostname

Code:
sudo nano /etc/hostname
enter what hostname you want save then exit

domanname

Code:
 %userx@voided 08:18:34 ~ >>$ sudo cat /etc/hosts
#
# /etc/hosts: static lookup table for host names
#

#<ip-address>		<hostname.domain.org>	<hostname>
127.0.0.1		localhost.localdomain	localhost
::1			localhost.localdomain	localhost ip6-localhost
127.xx.xx.xx            voided.domainName.xxx    voided
# End of file
edit hosts conf

I don't know how legal that is, if you have apache installed it goes in there.

4 red hat I found this
Quote:
Permanent hostname change on RedHat based systems

RedHat based system use the file /etc/sysconfig/network to read the saved hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME="plain.domainname.com"
GATEWAY="192.168.0.1"
GATEWAYDEV="eth0"
FORWARD_IPV4="yes"

So in order to preserve your change on system reboot edit this file and enter the appropriate name using the HOSTNAME variable.
at desktopx I think is what that said.

would be in that file "Permanent hostname change on RedHat based systems" /etc/sysconfig/network

Code:
HOSTNAME="desktopx.WHATEVERNAME-U-Want-HERE.com, org, net "
where .org .net .com are the common ones,
org = organization ~ non-profit organizations

com = commerce ~ the activity of buying and selling, especially on a large scale

net = network ~ mostly used for ones own server network, domain originally for network providers


domainname(1) - Linux man page
Quote:
Files
/etc/hosts /etc/sysconfig/network
Note
Note that hostname doesn't change anything permanently. After reboot original names from /etc/hosts are used again.

Last edited by BW-userx; 02-15-2016 at 09:57 PM.
 
1 members found this post helpful.
  


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
move user directory and make it as a root's directory yerunkar11 Linux - Server 3 07-27-2015 12:39 PM
[SOLVED] Invoke root directory owner/group while moving file/directory yogesh_attarde Linux - Security 5 04-15-2014 12:36 AM
[SOLVED] trouble accessing a directory Cultist Slackware 6 04-12-2013 06:49 PM
accessing root directeries by otherthan root user pandian Linux - Software 2 12-16-2005 02:35 AM
Accessing the Active Directory GoRinNoSho Linux - Newbie 3 06-27-2003 10:44 AM


All times are GMT -5. The time now is 10:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration