FOC - DO2
Introduction to Linux
Linux is an operating system and Android is powered by the linux operating system.
OS
is software that manages the communication between the software and its
hardware.
To
manage files in Linux OS we can use :
- Terminal (Command Line Interface - CLI)
- File Manager (Graphical User Interface-GUI)
Why
do we use a Command-line Interface?
- Commands offer more options and are flexible.
- More commands to copy and upload files in GUI
but in the case of CLI a single command can do it.
- CLI load fast and do not consume RAM like GUI.
There
are two ways to launch CLI on Ubuntu;
- Go to the Das and type terminal
- Or Press ctrl+alt+t
Once the CLI is launched the picture will be shown:
- First Part - user name. Eg: guru
- Second part - hostname. Eg:99 (Helps to
identify a computer over the network).
- Third part - Computer name. Eg: VirtualBox
- Fourth part - Simple separator. Eg: " :
"
- fifth part - Home Directory. Eg: " ~ "
- Sixth part - Sign for regular users. Eg: $
#
- sign for root user
Present Working Directory
A directory that you are currently
browsing.
Command - pwd (print working
directory).
Changing Directories.
To change the directory use - cd (change directory).
Navigating Home Directory: Command - cd OR cd~
Moving to the root directory: Command - cd /
Absolute Paths -
Full path is pecified to reach the file
Eg: To browse images in the Pictures
directory of the home folder, type - cd /home /guru99 /Pictures.
Relative Paths - do not specify the complete location within the same directory in the file system.
Eg: To browse downloads directory, type
- cd Downloads
Disk space usage : <df
-h> OR <lsblk>
Memory : <free -h> OR <cat
/proc /meminfo>
CPU : <lscpu> OR <cat / proc /
cpu>
Peripheral Component Interconnection
(PCI) devices: <lscpi>
All information about the hardware:
<lshw>
Comments
Post a Comment