What are some basic Linux commands

A terminal is where everything is done in Linux.To work with terminal you should know the commands.Given below are some basic Linux commands.
cd This command is used to navigate to a directory.eg:cd Desktop will take you to desktop.
cd .. This command will take you back to previous directory.
cd This comment will take you to the home directory.
ls The ls command will give you a list of all the files and folders in the directory.
pwd This will print the current working directory.
mkdir The mkdir command is used to make a directory.Example: mkdir myfilewill create a directory with the name myfile.
top The top (table of process) command will list you the current running processes and the processor usage along with some other details.Hit q to exit.
sudo poweroff To shutdown your computer you can use either sudo power off or sudo init .
sudo reboot You can use this command or sudo init 6 to reboot your computer.
passwd By using this command you can change the password of the current user.
cp This command is used to copy a file.For example  cp yourfile myfile will make an exact copy of yourfile and name it myfile.
history The history command will give you a list of commands which you have typed.Each commands listed will have a number on its left side.You can simply type !n (n will be replaced with number of listed command) to run that command.
df This command will give you details about the disc space.
touch you can you say touch command to create a file for example you can create a file named test.txt by typing touch test.txt .
cat You can add anything to a file by using cat command.To do this,first typecat>>filename and  hit enter key.Now type the contents and press ctrl+z to finish.

Comments

Popular posts from this blog

Optical Charactor Recognition (OCR) in C#

How to create a transparent window in Windows Form Application

Installing MASM on Windows (32 bit or 64 bit)