Linux 101
Linux 101
Commands
1. pwd (Print Working Directory) - to know which directory you are in. It gives
absolute path
2. ls - use the “ls” command to know what files are in the directory you are in.
option/s;
- a, -all
- l, use a long listing format
- t, sort by modification time, newest first
- r, reverse order while sorting
3. cd - use “cd” command to go to a directory. Remember this is case sensitive.
Typing cd then enter, takes you to the home directory.
cd .. - up one level or go back
cd ~ - got back to parent/home directory
4. cp - copies a file. It takes two arguments: The first is the location of the file to
be copied, the second is where to copy.
option/s
-r, copies directories recursively
5. mv - use the mv command to move files. We can also use mv command to
rename a file.
6. date - used to display system date and time.
6. touch - the touch command is used to create a file. It can be anything, from an
empty text file to an empty zip file
7. vi - is installed text editors in Linux.
vi editing commands:
esc - terminate insert mode
dd -delete line
:q - quit without saving
:wq - save the file and quit
8. top - allows user to monitor processes and system resource usage on Linux.
q - to exit
shift + p - sort the process by CPU utilization
c - show the absolute path of the process
9. uptime - is used to find out how long the system is active (running). This
command returns set of values that involve the current time, the amount of
time system is in running state, the number of users currently logged into, and
the load time for the past 1, 5, 15 minutes respectively
10. grep - which stands for “global regular expression print” processes text line by
line and prints any line which match a specified pattern.
-r - recursive
-i - ignore case
11. chown - is used to change the owner and group of files, directories and links.
12. chmod - used to change the access permissions of files and directories.
-R, recursive, includes objects in sub-directories
13. putty - is a software terminal emulator for Windows and Linux. It provides a
text user interface to remote computers running any of its supported protocols
including SSH and telnet.
Thank you