FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 134   



1.) pwd

[email protected]:~# pwd

pwd shows present working directory,

2.) ls

[email protected]:~# ls

The “Is” command shows files presnt in current directory you are in
use the command “ls -lah” to view the file sizes of all the files in a folder.

3.) cd

[email protected]:~# cd /var

cd refers to change directory which goes to that particular directory provided after cd command

4.) chmod

[email protected]:~# chmod 777 -R /var

above chmod command provides full permissions to var folder and its sub-folders recursively

5.) apt-get

[email protected]:~# apt-get

apt-get command is used to install packages in linux

[email protected]:~# apt-get install notepad

6.) hostname

[email protected]:~#  hostname

hostname gives your name in the network

[email protected]:~#  hostname -I

gives IP address

7.) df

[email protected]:~# df

df shows each mounted partition and their used/available space in % and in KBs.

8.) cat

[email protected]:~# cat

cat command shows contents of a file

9.) nano, vi

[email protected]:~# nano sample.txt

nano and vi are already installed text editors in the Linux command line.
You can save your files after editing by using the sequence, Ctrl+X, then Y (or N for no).

[email protected]:~# vi sample.txt

You can save your files after editing by pressing 'esc' button and :wq to save and quit or :q to quit without saving

10.) mkdir

[email protected]:~# mkdir Softwares

mkdir to create a directory

11.) rm

[email protected]:~# rm -rf Softwares

The rm command is used to delete files and directories. rm cannot simply delete a directory. “rm -rf” is used to delete a directory forcefully.

12.) touch

[email protected]:~# touch sample.txt

The touch command is used to create an empty file.

13.) man

[email protected]:~# man ls

“man ls” shows the page of the ls command.
Help

[email protected]:~# ls --help

help shows the ways command can be used

14.) cp

[email protected]:~# cp sample.txt /home/userName/Softwares

The cp command is used to copy files. It takes two arguments, the first one is source location of the file to be copied, the second is destination location where to copy.

15.) mv

[email protected]:~# mv sample.txt /home/userName/Softwares

The mv command is used to move files. It takes two arguments, the first one is source location of the file to be moved, the second is destination location where to move.

16.) echo

[email protected]:~# echo helloworld >> sample.txt

“echo” command moves data into text file

17.) zip, unzip
zip command used to compress files into a zip archive, unzip is used to extract files from a zip archive.

18.) tar, untar
To create a tar archive use tar -cvf , -xvf to untar a tar archive

19.) Ctrl+C can be used to stop any command in terminal safely, Ctrl+Z can be used to force stop it.

20.) halt, poweroff, reboot

[email protected]:~# poweroff

To power off or reboot the computer use command sudo halt or poweroff and sudo reboot.




On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News