How to use Linux:
Linux is a Unix based operating system. Linux has a reputation as a very efficient and fast-performing system. Normally we hear a command like “Linux is not user friendly”. No it is not! Working with Linux is more easy now-a-days. This post is also related to work with Linux. Here we are going to see some often used basic commands in Linux .
pwd : present working directory
i) pwd ” if we type just pwd it shows the current working directory”
cd : Change directory
i) cd /usr :- command takes you to the /usr directory. We need to note one main thing in Linux all the directories is placed under the “/” partition.
ii) cd .. :- move to the parent directory
iii) cd ~ :- move to root directory
ls : list the contents/files in a directory
i) ls -a :- list the files under the current directory including the hidden files.
ii) ls -l :- list the files with brief information like only readable, writable, ..etc.
iii) ls /root :- list the contents/files under the root directory.
cp : copy a file/directory from source to destination.
i) cp source destination
ou can also copy entire directories to another place, for eg
ii) cp -r /home/admin/ ~ this command copies the entire admin directory to the root directory.
mv : move the files from source to destination, we should note that when we move the file, which will be deleted from the source.
i) mv source destination
ii) mv base.txt /root/mk/ this command moves “base.txt” file from the current directory to the “mk” directory.
rm : remove a file from the current working directory.
i) rm mk.txt ” this command removes the mk.txt file from the current working directory.
mkdir : make directory
i) mkdir fruit ” this command create a directory with name of fruit under the current directory”
rmdir : remove directory
i) remove fruit ” this command removes fruit directory from the current working directory.
we need to note one thing to remove directory we have to remove the files inside the directory first. You need to use the following command
ii) rm -f /fruit ” this deletes the entire fruit directory.
wget : Download a file
i) wget “file location/link location” it downloads under the current working directory.
Free displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel.
Display output in bytes.
Display output in kilobytes (KB). This is the default.
Display output in megabytes (MB).
Display output in gigabytes (GB).
Was this answer helpful?
Linux has both zip and unzip program. By default, these utilities not installed, To install...
How to change the root password Change root password: There are two kind of things we need to...
Install ImageMagick: ImageMagick is a software suite to create, edit, and compose bitmap...
How to install csf: wget http://www.configserver.com/free/csf.tgz tar zxvf csf.tgz cd csf...
for 64 bit install unrar centos x64#wget...