LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 10-25-2011, 12:14 AM   #1
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Rep: Reputation: Disabled
Is ~\ different then \


Ignore the direction they re facing. Well is there? I hope because modiphying root directly seems like a pain and I need to.
 
Old 10-25-2011, 01:25 AM   #2
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
/ and ~/ are 100% different!

Here's a breakdown:

/ is the "root" of your file system. There is nothing above this directory in the hierarchy.

~ refers to the home directory if the user you're currently logged in as. If you open up the terminal and type
Code:
cd ~
then you will be at your home directory.

~/ is the same thing as ~, but you just have a slash after it.
 
Old 10-25-2011, 01:32 AM   #3
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
Thanks (I like your tone too it sounded 'fun'), Any other little addreess shortcuts like that I should know about?
 
Old 10-25-2011, 01:40 AM   #4
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
Shell Scripting

Clicked wrong button
 
Old 10-25-2011, 01:42 AM   #5
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
let's see...

cd (with nothing else) # will take you to your home directory, no matter where you are
cd .. # takes you to previous directory
sudo command # sudo followed by a command runs a command as root
(if sudo doesn't work...)
su -c "command" # runs command as root
su - # switch to the root user account and obtain root's bash profile
su (with no dash) # become root and keep your users bash profile
alias whatever="tail -f /var/log/messages" # type the "whatever" command you create and run whatever command you aliased it as

(add aliases to your ~/.bashrc or ~/.bash_profile file and they will always be there)
 
Old 10-25-2011, 07:42 AM   #6
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,600

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
cd - will take you to back to the previous active directory
 
  


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



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

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