0% found this document useful (0 votes)
96 views2 pages

Basic Terminal Commands 1

The document discusses 6 basic terminal commands for Linux: 1. sudo - Allows users to run commands as the superuser to perform tasks that require root privileges. 2. ls - Lists the contents of the current directory, including files and subfolders. 3. cd - Changes the current working directory, allowing users to navigate through the file system. 4. mkdir - Creates new directories or subfolders within the file system. 5. rm - Removes or deletes files and can also remove directories recursively with the -r flag. 6. cat - Displays the contents of text files, allowing users to view code or scripts.

Uploaded by

Sandeep Dwivedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views2 pages

Basic Terminal Commands 1

The document discusses 6 basic terminal commands for Linux: 1. sudo - Allows users to run commands as the superuser to perform tasks that require root privileges. 2. ls - Lists the contents of the current directory, including files and subfolders. 3. cd - Changes the current working directory, allowing users to navigate through the file system. 4. mkdir - Creates new directories or subfolders within the file system. 5. rm - Removes or deletes files and can also remove directories recursively with the -r flag. 6. cat - Displays the contents of text files, allowing users to view code or scripts.

Uploaded by

Sandeep Dwivedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic Terminal Commands

The traditional Unix environment is a CLI (command line interface), where you type commands to tell
the computer what to do. That is faster and more powerful, but requires finding out what the
commands are.
The basic commands that you will be using more frequently are

1. sudo
This SuperUserDo is the most important command Linux newbies will use. Every single
command that needs root's permission, need this sudo command. You can use sudo before
each command that requires root permissions -

$ sudo

2. ls (list)
Just like the other, you often want to see anything in your directory. With list command, the
terminal will show you all the files and folders of the directory that you're working in. Let's say
I'm in the /home folder and I want to see the directories & files in /home.

/home$ ls
3. cd
Changing directory (cd) is the main command that always be in use in terminal. It's one of the
most Linux basic commands. Using this is easy. Just type the name of the folder you want to
go in from your current directory. If you want to go up just do it by giving double dots (..) as
the parameter.

Let's say I'm in /home directory and I want to move in usr directory which is always in the
/home. Here is how I can use cd commands -
/home $ cd usr

/home/usr $

4. mkdir
Just changing directory is still incomplete. Sometimes you want to create a new folder or
subfolder. You can use mkdir command to do that. Just give your folder name after mkdir
command in your terminal.
~$ mkdir folderName

5. rm
rm is a command to remove your file or even your directory. You can use -f if the file need
root permission to be removed. And also you can use -r to do recursive removal to remove
your folder.

$ rm myfile.txt

6. cat
As a user, you often need to view some of text or code from your script. Again, one of the
Linux basic commands is cat command. It will show you the text inside your file.

$ cat CMakeLists.txt

You can read about terminal commands from the link below -

https://medium.com/the-code-review/top-10-bash-file-system-commands-you-cant-live-
without-4cd937bd7df1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy