SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Basics GNU/Linux Commands
Basics GNU/Linux Commands
#1. ls : list directory contents
ls
If you want to see hidden files/directories (beginning with dot.), the use -a flag.
ls -a
Check the manual for more detail (man ls).
#2. cd : Change Directory
cd ../
cd /home/Desktop
Remember,
. represents the current directory
.. represents the parent directory
~ represents the home directory (of the user)
#3. ​pwd​ : print the current/working directory
pwd
/home/Desktop/scripts
#4. ​mkdir​ : make/create directory.
mkdir ​funny_stuffs
#5. ​rm : remove/delete​ file/directory
rm useless.sh
NOTE : it removes directories only if it’s empty, unless you specify -f flag for force deletion. But you must be careful with the arguments such as -r, -f. (-rf is
very dangerous).
#6. ​sudo​ : superuser do, to gain root privilege
e.g
sudo apt-get install ​gnome-shell
Then enter your user account password, and you would be able to do administrative tasks like root. So if you’re getting any permission error using a
command, then adding sudo as a prefix, might help.
#7. ​mv : rename or move a file/directory
mv file1 ~​/Downloads/Archive/
the above command will move the file from the current directory to target directory.
mv logo_2.jpg new_logo.jpg
it will rename the file to new_logo.jpg.
#8. ​cat : View File contents
cat install.log
#9.​ man ​: A Reference manual for utils/commands/programs
e.g if you want to know more about rm command, then type –
man rm
#10. ​cp : Copy Files/Directories
cp movie_name.mp4 ~/Downloads/movies/
The above command will copy the movie_name.mp4 to the specified directory.
#11.​ wget : Download files from server
GNU Wget or wget is very handy in downloading stuffs from internet, over the command line.
wget url_of_the_content
#12.​ gksudo : Run GUI Application with Root privilege
gksudo nautilus
The above command will open nautilus with root privilege. It’s just like sudo, but in GUI mode.
#13. ​shutdown : To shutdown ​the computer from terminal
shutdown -h
where time can be 0 if you want to shutdown now or specify the exact time such as 10:30.
#14.​ restart : Restart the computer
restart
Package Management
These are Ubuntu Specific commands. It Requires root privilege, so just add the sudo prefix before each command (it will ask for the user password and
you’re done!).
#15. ​apt-get : Command Line Tool for handling packages
There are various options such as
install – To install package.
e.g Install the program PyRoom (A distraction Free Text Editor)
sudo apt-get install pyroom
remove – To remove package
sudo apt-get remove kate
update – To update the package cache
sudo apt-get update
#​16. add-apt-repository – To add a PPA (for your favorite Application)
e.g add the PPA for the App Eidete (Screencasting program)
sudo add-apt-repository ppa:shnatsel/eidete-daily
After, adding the PPA, apt-get update command is required.
#17. ​apt-cache : To access the Package details from cache
search : search for the related packages in the apt-cache
e.g
apt-cache search image editor
Prabathshantha@gmail.com

More Related Content

PDF
Archlinux install
PDF
Install Archlinux in 10 Steps (Sort of) :)
PPT
Sls01 Lecture02 Linux In Practice
PDF
Configuring the boot menu in ubuntu
PDF
ubunturef
PDF
Clase4 (consola linux)
PDF
Day 5 ubuntu boot camp
PDF
Using the command line on macOS
Archlinux install
Install Archlinux in 10 Steps (Sort of) :)
Sls01 Lecture02 Linux In Practice
Configuring the boot menu in ubuntu
ubunturef
Clase4 (consola linux)
Day 5 ubuntu boot camp
Using the command line on macOS

What's hot (20)

PPT
PPT
Terminal basic-commands(Unix) -partI
RTF
Useful linux-commands
PDF
EUC 2013 - Erlang in a *NIX World
ODP
Ubuntu presentation
PDF
How to install Odoo 13 in Ubuntu ?
DOC
6 stages of linux boot process
PPT
Common linux ubuntu commands overview
DOCX
6 stages of linux boot process
PPTX
Puppet barcampexercises.jzt
PPT
PDF
Day 6 ubuntu boot camp
PDF
Choosing Linux Distro - Personal Desktop
PDF
NCSU MGSA Unix Presentation
PDF
Linux Commands - 3
PPT
How to build and load linux to embedded system
PDF
小猴子也會的 Ubuntu Desktop 14.04 安裝教學
PDF
Linux Getting Started
TXT
Forcefully unmount a linux disk partition
PDF
Day4 ubuntu boot camp
Terminal basic-commands(Unix) -partI
Useful linux-commands
EUC 2013 - Erlang in a *NIX World
Ubuntu presentation
How to install Odoo 13 in Ubuntu ?
6 stages of linux boot process
Common linux ubuntu commands overview
6 stages of linux boot process
Puppet barcampexercises.jzt
Day 6 ubuntu boot camp
Choosing Linux Distro - Personal Desktop
NCSU MGSA Unix Presentation
Linux Commands - 3
How to build and load linux to embedded system
小猴子也會的 Ubuntu Desktop 14.04 安裝教學
Linux Getting Started
Forcefully unmount a linux disk partition
Day4 ubuntu boot camp
Ad

Viewers also liked (20)

PDF
Islami dënon terrorizmin. albanian (shqip)
PDF
Pro #7 JAN`16
PDF
Video and Opening up education @ camerazizanio
PDF
Как пробежать марафон и получить удовольствие
PDF
01 juego de tronos
PDF
ماهنامه تبلیغات مدرن شماره 1
PPTX
eLearning Expo 2013 Tεχνολογία και Mάθηση
PPTX
New Housing Projects in Wagholi Annex Pune
PPT
Economia col·laborativa, turisme col·laboratiu i KangApp
PDF
Why and Where to Outsource Data Entry Services? - Infographic
PPTX
Companies act 2014 Impact & implications for irish charities
PDF
Competing for Talent in Digital Age
PDF
EY_Utilization of mobile devices in Romania_ALL
PPTX
Five rivers in punjab
PPTX
Κολινδρός Πιερίας Τσούρας Αποστόλης, Α2 Γ. Κολινδρού, 2015-16
PDF
MAD 8108 KV100 Catalog (EEE & IPE Version)
PPTX
da best,LOL
PDF
PPSX
San francisco
Islami dënon terrorizmin. albanian (shqip)
Pro #7 JAN`16
Video and Opening up education @ camerazizanio
Как пробежать марафон и получить удовольствие
01 juego de tronos
ماهنامه تبلیغات مدرن شماره 1
eLearning Expo 2013 Tεχνολογία και Mάθηση
New Housing Projects in Wagholi Annex Pune
Economia col·laborativa, turisme col·laboratiu i KangApp
Why and Where to Outsource Data Entry Services? - Infographic
Companies act 2014 Impact & implications for irish charities
Competing for Talent in Digital Age
EY_Utilization of mobile devices in Romania_ALL
Five rivers in punjab
Κολινδρός Πιερίας Τσούρας Αποστόλης, Α2 Γ. Κολινδρού, 2015-16
MAD 8108 KV100 Catalog (EEE & IPE Version)
da best,LOL
San francisco
Ad

Similar to Basics Ubuntu commands (20)

PDF
Solaris basics
PDF
Ubuntu Practice and Configuration
PPT
Edup wifi for raspberry zero
DOCX
Basic linux commands
ODP
ODP
PDF
Basic shell commands by Jeremy Sanders
PPT
Fedora Linux
PPT
Linux_Fedora_ppt
PDF
Xen time machine
PPT
PDF
Linux Basic Commands
PPTX
Linux basics part 1
PPT
Linuxppt
PDF
Towards the perfect Drupal Dev Machine
PPTX
Linux Presentation
PDF
Linux basic for CADD biologist
PDF
Ubuntu alternate ubuntu installation
PPTX
Linux Fundamentals - An Intro to Linux Fundamentals
Solaris basics
Ubuntu Practice and Configuration
Edup wifi for raspberry zero
Basic linux commands
Basic shell commands by Jeremy Sanders
Fedora Linux
Linux_Fedora_ppt
Xen time machine
Linux Basic Commands
Linux basics part 1
Linuxppt
Towards the perfect Drupal Dev Machine
Linux Presentation
Linux basic for CADD biologist
Ubuntu alternate ubuntu installation
Linux Fundamentals - An Intro to Linux Fundamentals

Recently uploaded (20)

PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Transform Your Business with a Software ERP System
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
System and Network Administration Chapter 2
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Essential Infomation Tech presentation.pptx
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
AI in Product Development-omnex systems
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Introduction to Artificial Intelligence
Upgrade and Innovation Strategies for SAP ERP Customers
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Transform Your Business with a Software ERP System
CHAPTER 2 - PM Management and IT Context
System and Network Administration Chapter 2
How to Choose the Right IT Partner for Your Business in Malaysia
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Essential Infomation Tech presentation.pptx
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Understanding Forklifts - TECH EHS Solution
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
AI in Product Development-omnex systems
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Wondershare Filmora 15 Crack With Activation Key [2025
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Introduction to Artificial Intelligence

Basics Ubuntu commands

  • 2. Basics GNU/Linux Commands #1. ls : list directory contents ls If you want to see hidden files/directories (beginning with dot.), the use -a flag. ls -a Check the manual for more detail (man ls). #2. cd : Change Directory cd ../ cd /home/Desktop Remember, . represents the current directory .. represents the parent directory ~ represents the home directory (of the user) #3. ​pwd​ : print the current/working directory pwd /home/Desktop/scripts #4. ​mkdir​ : make/create directory. mkdir ​funny_stuffs #5. ​rm : remove/delete​ file/directory rm useless.sh NOTE : it removes directories only if it’s empty, unless you specify -f flag for force deletion. But you must be careful with the arguments such as -r, -f. (-rf is very dangerous). #6. ​sudo​ : superuser do, to gain root privilege e.g sudo apt-get install ​gnome-shell Then enter your user account password, and you would be able to do administrative tasks like root. So if you’re getting any permission error using a command, then adding sudo as a prefix, might help.
  • 3. #7. ​mv : rename or move a file/directory mv file1 ~​/Downloads/Archive/ the above command will move the file from the current directory to target directory. mv logo_2.jpg new_logo.jpg it will rename the file to new_logo.jpg. #8. ​cat : View File contents cat install.log #9.​ man ​: A Reference manual for utils/commands/programs e.g if you want to know more about rm command, then type – man rm #10. ​cp : Copy Files/Directories cp movie_name.mp4 ~/Downloads/movies/ The above command will copy the movie_name.mp4 to the specified directory. #11.​ wget : Download files from server GNU Wget or wget is very handy in downloading stuffs from internet, over the command line. wget url_of_the_content #12.​ gksudo : Run GUI Application with Root privilege gksudo nautilus The above command will open nautilus with root privilege. It’s just like sudo, but in GUI mode. #13. ​shutdown : To shutdown ​the computer from terminal shutdown -h where time can be 0 if you want to shutdown now or specify the exact time such as 10:30. #14.​ restart : Restart the computer restart Package Management These are Ubuntu Specific commands. It Requires root privilege, so just add the sudo prefix before each command (it will ask for the user password and you’re done!).
  • 4. #15. ​apt-get : Command Line Tool for handling packages There are various options such as install – To install package. e.g Install the program PyRoom (A distraction Free Text Editor) sudo apt-get install pyroom remove – To remove package sudo apt-get remove kate update – To update the package cache sudo apt-get update #​16. add-apt-repository – To add a PPA (for your favorite Application) e.g add the PPA for the App Eidete (Screencasting program) sudo add-apt-repository ppa:shnatsel/eidete-daily After, adding the PPA, apt-get update command is required. #17. ​apt-cache : To access the Package details from cache search : search for the related packages in the apt-cache e.g apt-cache search image editor Prabathshantha@gmail.com