To be in root command

Basic Linux Command Using Ubuntu terminal environment.

Ubuntu Terminal Environment
The Ubuntu terminal environment is a powerful tool that allows users to interact with the Ubuntu operating system directly via text-based commands. It is often referred to as the command line interface (CLI) and is built on the Bash shell by default. The terminal is essential for executing programs, managing files, installing packages, monitoring processes, and performing administrative tasks. It is a lightweight and faster alternative to the graphical user interface (GUI) for many tasks, offering more control and automation. However, it also has a steeper learning curve for beginners and can be more error-prone if commands are not executed correctly.

The Linux cogmand line for beginners
Its important to note that, in linux there’s always one space rule and its always case sensitive, it should always be in lower case.

sudo su (Administrative command)
This command makes you to be in administrative mode/root for you to able to install or update anything. Some people call it switch user or super user.

To be in root command

apt update
To update the environment.

apt update

clear
This command is use to clear the screen when the screen is clogged up.

To clear the screen

pwd(print work directory)
This is used to know where exactly you are in your ubuntu terminal shell.

pwd

mkdir
It is the command used to make a directory.In your linux terminal type mkdir and the folder directory. Lets create 3 directory; mkdir emmanuel,
mkdir zanmedix,
mkdir tech1

mkdir

ls
This command is used to list or see what is on your computer.

Iist

rmdirthen the name of the directory.
This is used to remove directory that you created.
lets remove tech1 and emmanuel
rmdir tech1
rmdir emmanuel

touch “name of the file”
This is used to create an empty file. Lets create three empty files
touch txt-1
touch txt-2
touch txt-3

then ls to see the created empty files

Iist

rm “then the name of the file”
This command is used to delete file.e,g let delete txt-1 and txt-2.

to delete empty file

cd
This command is used to enter into a directory. lets do cd dr-1

cd into the directory

rm -rf “the directory that is not empty”
this is used to delete a directory you have cd into it. For example lets delete dr-1 thats no longer empty. we going to use this line of command rm -rf dr-1

reinforce removal of a directory

cd “directory”, touch txt-1
This command line is used to open a driectory and create a text file in the directory. E.g cd dr-1. touch txt1

opening a directory and creating a text file

cd ..
This is a command use to leave a particular folder/directory, lets for example we would like to leave dir-1 folder, in our command terminal we write the following command y.

to leave a folder/directory

cp
This command is use to copy file to a folder.lets say for example you want to copy text file to a directory you use cp command. lets try it cp txt1 dir-1..Then cd into the directory and do ls to confirm if the txt1 file was copied.

cp command

mv
This command is used to move a text file to a folder or directory. if you want to move lets txt2 file to a dir-2. we use this command line mv txt2 dir-2. Then cd into dir-2 folder cd dir-2 then ls to confirm the move.

mv txt2 dir-2

ls -l (longlisting)
This command is used to list everything in a long format. Lets try in our terminal shell

ls -l

ls -al
This command is used to list hidden files.

ls -al

ls -a
This command hide things for you.

ls -a

Similar Posts