Jump to content

Quick linux/unix help

I have a homework problem about unix/linux command line but I don't have a computer on it to test it out right now.

When you are in the terminal what do you type to get your current path?


I think it's like echo $Path, but what part of that do you specifically type? or is it the whole thing? Does echo come by default?

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, bobhays said:

I have a homework problem about unix/linux command line but I don't have a computer on it to test it out right now.

When you are in the terminal what do you type to get your current path?


I think it's like echo $Path, but what part of that do you specifically type? or is it the whole thing? Does echo come by default?

$ pwd

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, icey said:

$ pwd

Thanks, do you have to type the "$" part?

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, bobhays said:

Thanks, do you have to type the "$" part?

Nah 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, AlexTheRose said:

echo $PATH is probably what you’re looking for.

wat

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, AlexTheRose said:

Dude, you sure about that? IIRC the only time you don’t have to type the $ is when setting a variable...

It has been a while since I used the command.. but IIRC no $ is required.

Link to comment
Share on other sites

Link to post
Share on other sites

pwd is all you need to type.

Quote

kujoe@nouse:~$
kujoe@nouse:~$ pwd
/home/kujoe
kujoe@nouse:~$

 

-KuJoe

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, bobhays said:

Thanks for the help guys, just finished it.

Isn't unix fun?!

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, icey said:

$ pwd

Just in case this is helpful for anyone...

 

If you see $ before a command, that means you can type it with any user.

If you see #, then it means you must be root.

Link to comment
Share on other sites

Link to post
Share on other sites

It's...

 

	pwd
	

If you wonder why it's pwd, it stands for Print Working Directory.

Where I hang out: The Garage - Car Enthusiast Club

My cars: 2006 Mazda RX-8 (MT) | 2014 Mazda 6 (AT) | 2009 Honda Jazz (AT)


PC Specs

Indonesia

CPU: i5-4690 | Motherboard: MSI B85-G43 | Memory: Corsair Vengeance 2x4GB | Power Supply: Corsair CX500 | Video Card: MSI GTX 970

Storage: Kingston V300 120GB & WD Blue 1TB | Network Card: ASUS PCE-AC56 | Peripherals: Microsoft Wired 600 & Logitech G29 + Shifter

 

Australia 

CPU: Ryzen 3 2200G | Motherboard: MSI - B450 Tomahawk | Memory: Mushkin - 8GB (1 x 8GB) | Storage: Mushkin 250GB & Western Digital - Caviar Blue 1TB
Video Card: GIGABYTE - RX 580 8GB | Case: Corsair - 100R ATX Mid Tower | Power Supply: Avolv 550W 80+ Gold

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×