SlideShare a Scribd company logo
ESSENTIALS
Ctrl + plus key or minus = increese or decrease font size in terminal
window
echo Hello World = types Hello World� �
Up and down arrows = move to previous next commands (command history)
exit = closes the window
Ctrl + a = move the cursor to the beginning
Ctrl + e = move the cursor to the end
Tab = Will try to guess what you want to type
Tab + Tab = Will show you a list of all possible matches for autocomplete
Ctrl + l = clear the screen
COMMAND STRUCTURE
command options (arguments of options) arguments
echo $SHELL = what shell will you be launched as (login shell)
echo $0 = what is the current shell in use
sh = move to the sh shell
HELP
man echo = shows you the manual page for the echo commands
man man = shows you the manual page for the man commands
apropos ban = searches for possible matches for commands containing ban
whatis banner
MOVING AROUND DIRECTORIES
pwd = present working directory, where i am located right now
ls = list the contents of pwd
ls -l = list vertical format
ls -a = list dot files which are invisible config files
ls -h = returns the size of the files listed
cd nameofdirectory = changes pwd to nameofdirectory directory
cd .. = changes directory to parent directory
cd Library/Preferences = moves two directories at once
cd ../.. = go to the parent of the parent of this directory
cd / = go to root of our hard drive
cd /Library/Preferences = move to absolute path
cd ~ = moves you to the user directory
cd - = toggles you between current directory and last dir you were in
cd Application Support or cd Application Support� �
will move into the Application Support directory. As a general rule, try
not to use spaces or symbols except the _ on file names. Use numbers and
letters. Most unix systems are case sensitive so MyFile and myfile are two
different files.
CREATE FILES
touch newfile.txt = create a file
touch existingfile.txt = update the file's access time
nano = enter the nano editor
nano newfile.txt = it will enter the editor and will have that name
waiting for you.
Within nano you can move forwards and backwards, cut and uncut (paste)
text, help menu, search for, etc..
at www.nano-editor.org is a resource to learn more
READ FILES
you can read files using
nano filetoread.txt
to read the file
1. cat = reads and output the first file and read and concatenate second
file
if you pass only one file, you just use it to read that filetoread.txt
example cat short_file.txt newfile.txt
outputs the two files concatenated
2. more = output one page of text and you can move forward pressing
spacebar
3. less = same as more but loads one page into memory and you can scroll
backwards. Even if you type more, less will execute, because less is an
improvement on more.
f = go forwards
b = go backwards
q = quit
shift+g = go to the end of the doc
g = takes you to the top of the doc
less -M = get info on scrolling
less -N = get line numbers
head somefile.txt = shows you the first lines of a file
tail somefile.txt = shows you the last lines of a file
tail -f = it will watch for changes in the file.txt on a different
terminal window.
ctrl+c = exit
DIRECTORIES
mkdir directoryname = creates directory
mkdir directoryname/test1 = creates directory inside another
to create all parent directories at once mkdir -p
directory1/test1/test2/test3
ls -la testdir/
shows you what is in there
MOVING AND RENAMING FILES AND DIRECTORIES
mv newfile.txt testdir/newfile.txt
or
mv newfile.txt testdir
moves the file into the testdir directory
mv newfile.txt ../newfile.txt
or
mv newfile.txt ..
moves the newfile.txt file into the parent folder
mv test1/test3 test1/test2
moves test3 directory inside the test1 directory into the test1/test2
directory1
TO RENAME A FILE
mv newfile.txt new_file.txt
renames newfile as new_file
mv newfile.txt testdir/new_file.txt
renames new file and moves it inside testdir
mv -n = no overwriting dont accidentally overwrite a file.txt�
mv -f = force overwriting
mv -i = ask me if i want to overwrite
mv -v = gives you reporting information
by default mv is mv -f
COPY FILES
cp filetobecopied.txt destinationofcopy.txt
cp -n = no overwriting
cp -f = force overwriting
cp -i = ask me if i want to overwrite
cp -v = get information
cp -R = copy a directory and all of its contents
cp -R directorytocopy copyofdirectory
REMOVING FILES AND DIRECTORIES
rm filetoremove.txt
completely deletes a file
rmdir directorytodelete
completely deletes an empty directory1
rm -R directorytodelete
completely deletes a directory and all its contents
LINKS IN UNIX
ln filetolink hardlink
creates a link(shortcut) to a file.txt like in windows
except hardlinks don't break if original file is deleted
ln -s filetolink symlink
creates a symbolic link
Symbolic links reference the path to the file, not the file itself.
Hardlinks keep track of the file, symbolic links just of the path. They break if
the file is moved or deleted.
SEARCHING FILES AND DIRECTORIES
find path expression
find ~/Documents -name someimage.jpg� �
where -name and someimage.jpg are arguments not options.� �
That will return searching in the User/Documents folder anything with the
name someimage.jpg
Wildcards:
* = 0 or more characters can be represented
? = any one characters
[] = any of the characters within the brackets
you can do more complex searches for size, read the man pages.
find ~ -name *.txt -and -not -path *Quicktime*
Searches in the user folder anything with .txt in their name and not
within a path that contains Quicktime in the route.
FILE OWNERSHIP AND PRIVILEGES
whoami = tells you which user you are
cd ~ = will send you to the folder of whoever you are logged in as
echo $HOME = that's where your home directory is (for your user)
GROUPS
Each user can belong to a group. File permissions can be assigned to users
or groups of users. By adding a user to a group they can gain access to files.
Groups = shows you the groups you belong to
FILE AND DIRECTORY OWNERSHIP
The owner is the third column, the group is the fourth column.
We can set permissions based on the owner or the group.
Any file you create is yours to own
chown kevin:staff ownership.txt
chown kevin ownsership.txt
chown :staff ownership.txt
chown kevin:staff directory1
changes ownership of ownership.txt to kevin owner and staff group
chown R kevin:staff testdirectory�
changes ownership of testdirectory and all its contents to kevin and the
group staff
sudo chown lynda:staff ownership.txt
changes ownership as superuser
FILE AND DIRECTORY PERMISSIONS
in ls -la first colum:
first character: d directory, - file, l for symbolic link
following characters: user, group, other
r read the file, w write the file, x execute the file or directory
example:
drwxrw-r--
a directory where the user can read, write, and execute, a group that can
read and write but not execute, and others who can only read the file
chmod
change mode or change permissions
structure:
chmod mode filename
user: u, group: g, other: o
chmod ugo=rwx filename
give read write and execute permissions to user group and other
chmod u=rwx, g=rw, o=r filename
chmod ug+w filename
for user and group add the write permissions
chmod o-w filename
for other remove write permissions
chmod a+rw
add read write permission to all (a) (user, group, other)
chmod -R g+w test1
will changes write permissions for groups on the test1 directory and
everything inside of it
OCTAL NOTATION TO CHANGE FILE PERMISSIONS
r = 4, w =2, x= 1
rwx = 7, rw=6, rx=5, w=2 and so on
chmod 777 filename
give all the permissions to everyone
chmod 764 filename
user has all privileges, group read and write, and others only read
chmod 000 filename
take all privileges from everyone
SWITCH TO A DIFFERENT USER IDENTITY
The root user can do absolutely anything on the unix system. Not bound by
normal user permissions
sudo = substitute the user and do
sudo ls -la
won't require a password for five minutes after entering the password the
first time.
sudo -k
to ask it to ask you a password
sudo whoami
(it will show current user as sudo)
sudo -u lynda whoami
(it will say lynda)
sudo without any options will make you into the root user.
Only admins can do sudo.
UNIX COMMANDS AND PROGRAMS
commands are executable files, they are shorthands of files and you pass
arguments the file executes.
Whereis echo
which echo
whatis banner
get information about commands
it's common you can pass -v, –version, or –help
after the command to learn more about commands
To exit programs, most common:
q, x, ctrl + x, ctrl + q, or ESC
you can force quite Ctrl + c.
you can put semicolons between commands to execute two commands in
sequence
MANAGE COMMANDS
echo $PATH
outputs a colon separated list of directories where to look for the
command echo
it will look from left to write
PATH=directory/subfolder:directory2/subfolder
to set the path, it only lasts for the current session
which ruby
it will tell us the path we'll get if we type the command ruby
USEFUL COMMANDS
date
tells you the current date the computer has been set to
uptime
tells us the time the computer has been turned on
who
shows us a list of all users and what they are doing
(each new terminal open adds an instance of the same user)
Only admins can do sudo.
UNIX COMMANDS AND PROGRAMS
commands are executable files, they are shorthands of files and you pass
arguments the file executes.
Whereis echo
which echo
whatis banner
get information about commands
it's common you can pass -v, –version, or –help
after the command to learn more about commands
To exit programs, most common:
q, x, ctrl + x, ctrl + q, or ESC
you can force quite Ctrl + c.
you can put semicolons between commands to execute two commands in
sequence
MANAGE COMMANDS
echo $PATH
outputs a colon separated list of directories where to look for the
command echo
it will look from left to write
PATH=directory/subfolder:directory2/subfolder
to set the path, it only lasts for the current session
which ruby
it will tell us the path we'll get if we type the command ruby
USEFUL COMMANDS
date
tells you the current date the computer has been set to
uptime
tells us the time the computer has been turned on
who
shows us a list of all users and what they are doing
(each new terminal open adds an instance of the same user)

More Related Content

PDF
Linux comands for Beginners
PDF
Linux Bash Shell Cheat Sheet for Beginners
PDF
DOC
PC Software - Computer Application - Office Automation Tools
PDF
Linux cheat-sheet
PDF
Basic linux commands
TXT
Applecmdlista zs
Linux comands for Beginners
Linux Bash Shell Cheat Sheet for Beginners
PC Software - Computer Application - Office Automation Tools
Linux cheat-sheet
Basic linux commands
Applecmdlista zs

What's hot (19)

PDF
Unix command line concepts
PDF
Unix Command-Line Cheat Sheet BTI2014
PPTX
Linux commands
PDF
Unix primer
PDF
Unix Basics Commands
DOC
Treebeard's Unix Cheat Sheet
PDF
Basic basic solaris quick referent card
PDF
Introduction to UNIX Command-Lines with examples
PPTX
Basics of Unix Adminisration
PDF
21bUc8YeDzZpE
PPTX
Directory Commands - R.D.Sivakumar
PPT
Common linux ubuntu commands overview
PPT
Linux commands
ODP
Linux commd
ODP
Linux commd
PDF
Unix / Linux Command Reference
PPT
PDF
Basic unix commands_1
Unix command line concepts
Unix Command-Line Cheat Sheet BTI2014
Linux commands
Unix primer
Unix Basics Commands
Treebeard's Unix Cheat Sheet
Basic basic solaris quick referent card
Introduction to UNIX Command-Lines with examples
Basics of Unix Adminisration
21bUc8YeDzZpE
Directory Commands - R.D.Sivakumar
Common linux ubuntu commands overview
Linux commands
Linux commd
Linux commd
Unix / Linux Command Reference
Basic unix commands_1
Ad

Viewers also liked (16)

PPTX
Power point ppt
PDF
Syllabus pedagogia de los derechos humanos distancia
PDF
03. cuestionario de hechos capítulo 3 la restauración de israel
PPTX
Mapa medicina legal diversos temas luisa
PDF
Localización de plantas industriales
PDF
Big Data Analytics Tokyo講演資料
PPTX
Paso 2
PPTX
Sistemas estructurales estructuras v
PDF
503 Update Exp_7-1-2019
PPTX
Bav docentes
DOC
Proposal penelitian
PDF
R&d brochure
PPSX
Acidosy bases parte1
PDF
C.003 task based risk assessment
DOCX
Frontera de Posibilidades de Producción (FPP)
Power point ppt
Syllabus pedagogia de los derechos humanos distancia
03. cuestionario de hechos capítulo 3 la restauración de israel
Mapa medicina legal diversos temas luisa
Localización de plantas industriales
Big Data Analytics Tokyo講演資料
Paso 2
Sistemas estructurales estructuras v
503 Update Exp_7-1-2019
Bav docentes
Proposal penelitian
R&d brochure
Acidosy bases parte1
C.003 task based risk assessment
Frontera de Posibilidades de Producción (FPP)
Ad

Similar to Unix3 (20)

PDF
3.1.a linux commands reference
PDF
Command Line Tools
PPT
Linux ppt
PPTX
various shell commands in unix operating system.pptx
PDF
basic-unix.pdf
PPTX
Linux System commands Essentialsand Basics.pptx
DOC
58518522 study-aix
PDF
Linux cheat sheet
PDF
Linux Cheat Sheet.pdf
PPTX
Linux Commands all presentation file .pptx
DOCX
Directories description
PPT
8.1.intro unix
PDF
MCLS 45 Lab Manual
PPT
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
PPTX
2. UNIX OS System Architecture easy.pptx
PPTX
Unix Trainning Doc.pptx
PDF
Lesson 3 Working with Files in Linux
DOCX
40 basic linux command
DOCX
40 basic linux command
PPT
Unix Basics 04sp
3.1.a linux commands reference
Command Line Tools
Linux ppt
various shell commands in unix operating system.pptx
basic-unix.pdf
Linux System commands Essentialsand Basics.pptx
58518522 study-aix
Linux cheat sheet
Linux Cheat Sheet.pdf
Linux Commands all presentation file .pptx
Directories description
8.1.intro unix
MCLS 45 Lab Manual
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
2. UNIX OS System Architecture easy.pptx
Unix Trainning Doc.pptx
Lesson 3 Working with Files in Linux
40 basic linux command
40 basic linux command
Unix Basics 04sp

More from Krishna Prasad (7)

TXT
TXT
TXT
DOC
Dw concepts
DOC
Etl testing
DOC
Success quotes from nh
TXT
Datastage details
Dw concepts
Etl testing
Success quotes from nh
Datastage details

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administraation Chapter 3
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
history of c programming in notes for students .pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Digital Strategies for Manufacturing Companies
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo POS Development Services by CandidRoot Solutions
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administraation Chapter 3
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
2025 Textile ERP Trends: SAP, Odoo & Oracle
ISO 45001 Occupational Health and Safety Management System
Design an Analysis of Algorithms I-SECS-1021-03
How to Migrate SBCGlobal Email to Yahoo Easily
history of c programming in notes for students .pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Choose the Right IT Partner for Your Business in Malaysia
VVF-Customer-Presentation2025-Ver1.9.pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design

Unix3

  • 1. ESSENTIALS Ctrl + plus key or minus = increese or decrease font size in terminal window echo Hello World = types Hello World� � Up and down arrows = move to previous next commands (command history) exit = closes the window Ctrl + a = move the cursor to the beginning Ctrl + e = move the cursor to the end Tab = Will try to guess what you want to type Tab + Tab = Will show you a list of all possible matches for autocomplete Ctrl + l = clear the screen COMMAND STRUCTURE command options (arguments of options) arguments echo $SHELL = what shell will you be launched as (login shell) echo $0 = what is the current shell in use sh = move to the sh shell HELP man echo = shows you the manual page for the echo commands man man = shows you the manual page for the man commands apropos ban = searches for possible matches for commands containing ban whatis banner MOVING AROUND DIRECTORIES pwd = present working directory, where i am located right now ls = list the contents of pwd ls -l = list vertical format ls -a = list dot files which are invisible config files ls -h = returns the size of the files listed cd nameofdirectory = changes pwd to nameofdirectory directory cd .. = changes directory to parent directory cd Library/Preferences = moves two directories at once cd ../.. = go to the parent of the parent of this directory cd / = go to root of our hard drive cd /Library/Preferences = move to absolute path cd ~ = moves you to the user directory cd - = toggles you between current directory and last dir you were in cd Application Support or cd Application Support� � will move into the Application Support directory. As a general rule, try not to use spaces or symbols except the _ on file names. Use numbers and letters. Most unix systems are case sensitive so MyFile and myfile are two different files. CREATE FILES touch newfile.txt = create a file touch existingfile.txt = update the file's access time nano = enter the nano editor nano newfile.txt = it will enter the editor and will have that name waiting for you. Within nano you can move forwards and backwards, cut and uncut (paste)
  • 2. text, help menu, search for, etc.. at www.nano-editor.org is a resource to learn more READ FILES you can read files using nano filetoread.txt to read the file 1. cat = reads and output the first file and read and concatenate second file if you pass only one file, you just use it to read that filetoread.txt example cat short_file.txt newfile.txt outputs the two files concatenated 2. more = output one page of text and you can move forward pressing spacebar 3. less = same as more but loads one page into memory and you can scroll backwards. Even if you type more, less will execute, because less is an improvement on more. f = go forwards b = go backwards q = quit shift+g = go to the end of the doc g = takes you to the top of the doc less -M = get info on scrolling less -N = get line numbers head somefile.txt = shows you the first lines of a file tail somefile.txt = shows you the last lines of a file tail -f = it will watch for changes in the file.txt on a different terminal window. ctrl+c = exit DIRECTORIES mkdir directoryname = creates directory mkdir directoryname/test1 = creates directory inside another to create all parent directories at once mkdir -p directory1/test1/test2/test3 ls -la testdir/ shows you what is in there MOVING AND RENAMING FILES AND DIRECTORIES mv newfile.txt testdir/newfile.txt or mv newfile.txt testdir moves the file into the testdir directory mv newfile.txt ../newfile.txt or mv newfile.txt .. moves the newfile.txt file into the parent folder mv test1/test3 test1/test2 moves test3 directory inside the test1 directory into the test1/test2 directory1 TO RENAME A FILE
  • 3. mv newfile.txt new_file.txt renames newfile as new_file mv newfile.txt testdir/new_file.txt renames new file and moves it inside testdir mv -n = no overwriting dont accidentally overwrite a file.txt� mv -f = force overwriting mv -i = ask me if i want to overwrite mv -v = gives you reporting information by default mv is mv -f COPY FILES cp filetobecopied.txt destinationofcopy.txt cp -n = no overwriting cp -f = force overwriting cp -i = ask me if i want to overwrite cp -v = get information cp -R = copy a directory and all of its contents cp -R directorytocopy copyofdirectory REMOVING FILES AND DIRECTORIES rm filetoremove.txt completely deletes a file rmdir directorytodelete completely deletes an empty directory1 rm -R directorytodelete completely deletes a directory and all its contents LINKS IN UNIX ln filetolink hardlink creates a link(shortcut) to a file.txt like in windows except hardlinks don't break if original file is deleted ln -s filetolink symlink creates a symbolic link Symbolic links reference the path to the file, not the file itself. Hardlinks keep track of the file, symbolic links just of the path. They break if the file is moved or deleted. SEARCHING FILES AND DIRECTORIES find path expression find ~/Documents -name someimage.jpg� � where -name and someimage.jpg are arguments not options.� � That will return searching in the User/Documents folder anything with the name someimage.jpg
  • 4. Wildcards: * = 0 or more characters can be represented ? = any one characters [] = any of the characters within the brackets you can do more complex searches for size, read the man pages. find ~ -name *.txt -and -not -path *Quicktime* Searches in the user folder anything with .txt in their name and not within a path that contains Quicktime in the route. FILE OWNERSHIP AND PRIVILEGES whoami = tells you which user you are cd ~ = will send you to the folder of whoever you are logged in as echo $HOME = that's where your home directory is (for your user) GROUPS Each user can belong to a group. File permissions can be assigned to users or groups of users. By adding a user to a group they can gain access to files. Groups = shows you the groups you belong to FILE AND DIRECTORY OWNERSHIP The owner is the third column, the group is the fourth column. We can set permissions based on the owner or the group. Any file you create is yours to own chown kevin:staff ownership.txt chown kevin ownsership.txt chown :staff ownership.txt chown kevin:staff directory1 changes ownership of ownership.txt to kevin owner and staff group chown R kevin:staff testdirectory� changes ownership of testdirectory and all its contents to kevin and the group staff sudo chown lynda:staff ownership.txt changes ownership as superuser FILE AND DIRECTORY PERMISSIONS in ls -la first colum: first character: d directory, - file, l for symbolic link following characters: user, group, other r read the file, w write the file, x execute the file or directory example: drwxrw-r-- a directory where the user can read, write, and execute, a group that can read and write but not execute, and others who can only read the file chmod change mode or change permissions structure: chmod mode filename
  • 5. user: u, group: g, other: o chmod ugo=rwx filename give read write and execute permissions to user group and other chmod u=rwx, g=rw, o=r filename chmod ug+w filename for user and group add the write permissions chmod o-w filename for other remove write permissions chmod a+rw add read write permission to all (a) (user, group, other) chmod -R g+w test1 will changes write permissions for groups on the test1 directory and everything inside of it OCTAL NOTATION TO CHANGE FILE PERMISSIONS r = 4, w =2, x= 1 rwx = 7, rw=6, rx=5, w=2 and so on chmod 777 filename give all the permissions to everyone chmod 764 filename user has all privileges, group read and write, and others only read chmod 000 filename take all privileges from everyone SWITCH TO A DIFFERENT USER IDENTITY The root user can do absolutely anything on the unix system. Not bound by normal user permissions sudo = substitute the user and do sudo ls -la won't require a password for five minutes after entering the password the first time. sudo -k to ask it to ask you a password sudo whoami (it will show current user as sudo) sudo -u lynda whoami (it will say lynda) sudo without any options will make you into the root user.
  • 6. Only admins can do sudo. UNIX COMMANDS AND PROGRAMS commands are executable files, they are shorthands of files and you pass arguments the file executes. Whereis echo which echo whatis banner get information about commands it's common you can pass -v, –version, or –help after the command to learn more about commands To exit programs, most common: q, x, ctrl + x, ctrl + q, or ESC you can force quite Ctrl + c. you can put semicolons between commands to execute two commands in sequence MANAGE COMMANDS echo $PATH outputs a colon separated list of directories where to look for the command echo it will look from left to write PATH=directory/subfolder:directory2/subfolder to set the path, it only lasts for the current session which ruby it will tell us the path we'll get if we type the command ruby USEFUL COMMANDS date tells you the current date the computer has been set to uptime tells us the time the computer has been turned on who shows us a list of all users and what they are doing (each new terminal open adds an instance of the same user)
  • 7. Only admins can do sudo. UNIX COMMANDS AND PROGRAMS commands are executable files, they are shorthands of files and you pass arguments the file executes. Whereis echo which echo whatis banner get information about commands it's common you can pass -v, –version, or –help after the command to learn more about commands To exit programs, most common: q, x, ctrl + x, ctrl + q, or ESC you can force quite Ctrl + c. you can put semicolons between commands to execute two commands in sequence MANAGE COMMANDS echo $PATH outputs a colon separated list of directories where to look for the command echo it will look from left to write PATH=directory/subfolder:directory2/subfolder to set the path, it only lasts for the current session which ruby it will tell us the path we'll get if we type the command ruby USEFUL COMMANDS date tells you the current date the computer has been set to uptime tells us the time the computer has been turned on who shows us a list of all users and what they are doing (each new terminal open adds an instance of the same user)