Basic Linux Commands For Daily Usage

A Handy Guide for Basic Linux Commands


Linux, an open-source Operating System is one of the most popular operating systems which takes inputs in the form of commands to direct a computer program to perform a specific task. To use this Operating System we need to get familiar with the commands to navigate between directories, manipulate files, change permissions, display disk information, and many more other tasks.

In the article, we will walk you through some of the most common Linux Commands that will make your life easier no matter whether you are new to the Linux interface or an experienced user.


Find the most common Linux Commands in this table :


FILES & NAVIGATING

lsdirectory listing
ls -lformatted listing
ls -laformatting listing including hidden files
touch file_namecreates a new file
pwdshow current working directory
mkdir dircreate a directory(dir -> directory name)
mkdir -pIt will create the parent directory first if it doesn’t exist. But if it already exists, then it will not print an error message and will move further to create sub-directories.
rm filedelete file
rm -rf dirremove directory(dir -> directory name)
cp file1 file2copy file1 to file2
cat fileshow the output for the contents of a file
mv file1 /home/oracle/file2used to move and rename files
grepused to search a given pattern in a file

PROCESSES

psdisplays currently active process
topdisplays all running processes
kill pidTerminates processes with a given pid
kill all prockill/terminates all processes named proc
bgResumes suspended jobs in the background
fgBrings suspended jobs to the foreground

SYSTEM INFO

datedisplays current date and time of the system
uptimedisplays how long the system is running including load average
uname -adisplays Linux kernel system information
hostnameshows the system hostname
last rebootshows system reboot history
caldisplays current calendar month and day
whoamidisplays who you are logged in as
historyused to review commands entered before
manmanual for Linux commands
locateused to locate a file
findsearches for files within a given directory

PERMISSIONS

chmod octal filenamechange file permissions to octal
chmod 777set read/write/execute permission to owner,group, and everyone having access to the server
chmod 755set read/write/execute permission to owner and r_x to group and everyone
chmod -R 777The -R argument also means that it is recursive so the permission change applies to every file in that directory.
chown -rchange ownership of a file recursively
chown owner-user:owner-group filenamechange owner and group owner of the file

DIRECTORY TRAVERSE

cdchange directory to $HOME directory
cd ..Move up one level in the directory tree structure
cd /testchange directory to /test

DISK USAGE

df -kh displays free space on mounted system in KB
du -sh displays disk usage in the current directory in a human-readable format
df -idisplays free inodes on file systems

 

This document is just for learning purpose and always validate in the LAB environment first before applying in the LIVE environment.


Hope so you like this article
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to know more about our pursuit.

Related Articles

LINUX | SCRIPTS | UNIX | UNIX:LINUX


 1,282 Total Views,  1 Views Today

How useful was this post?

Click on a star to rate it!

Average rating 4.8 / 5. Vote count: 4

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Spread the Knowledge!

4 thoughts on “<a href="https://dbsguru.com/basic-linux-commands-for-daily-usage/">Basic Linux Commands For Daily Usage<a>”

Leave a Reply

Your email address will not be published. Required fields are marked *

20 − ten =

Open chat
1
Contact Us:
Hi,

Greetings of the day! How can we help you?

Thanks.
Team DBsGuru
Direct Call:+91-9310167776
Email: info@dbsguru.com

Share Learn Grow!


Click on the below technical group to join us to share expertise in PostgreSQL and MySQL on WhatsApp group. The purpose of this group is only help to the DBA community.

PostgreSQL Technical Group.

MySQL technical Group.

Technical Links Powered by DBsGuru.

Thanks.
Team DBsGuru.