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
|ls -l||formatted listing|
|ls -la||formatting listing including hidden files|
|touch file_name||creates a new file|
|pwd||show current working directory|
|mkdir dir||create a directory(dir -> directory name)|
|mkdir -p||It 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 file||delete file|
|rm -rf dir||remove directory(dir -> directory name)|
|cp file1 file2||copy file1 to file2|
|cat file||show the output for the contents of a file|
|mv file1 /home/oracle/file2||used to move and rename files|
|grep||used to search a given pattern in a file|
|ps||displays currently active process|
|top||displays all running processes|
|kill pid||Terminates processes with a given pid|
|kill all proc||kill/terminates all processes named proc|
|bg||Resumes suspended jobs in the background|
|fg||Brings suspended jobs to the foreground|
|date||displays current date and time of the system|
|uptime||displays how long the system is running including load average|
|uname -a||displays Linux kernel system information|
|hostname||shows the system hostname|
|last reboot||shows system reboot history|
|cal||displays current calendar month and day|
|whoami||displays who you are logged in as|
|history||used to review commands entered before|
|man||manual for Linux commands|
|locate||used to locate a file|
|find||searches for files within a given directory|
|chmod octal filename||change file permissions to octal|
|chmod 777||set read/write/execute permission to owner,group, and everyone having access to the server|
|chmod 755||set read/write/execute permission to owner and r_x to group and everyone|
|chmod -R 777||The -R argument also means that it is recursive so the permission change applies to every file in that directory.|
|chown -r||change ownership of a file recursively|
|chown owner-user:owner-group filename||change owner and group owner of the file|
|cd||change directory to $HOME directory|
|cd ..||Move up one level in the directory tree structure|
|cd /test||change directory to /test|
|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 -i||displays 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.
609 total views, 1 views today
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?
Hello and welcome to DBsGuru,
I am Sruti Banerjee, having experience of 3 years as an Oracle DBA, I have good interpersonal skills that can help in attaining the desired level of team coordination, self-starter & quick learner. I am having rich experience in Oracle database management, Backup and Recovery, Security, Installation, Up-gradation, Patching, Migration, Cloning of databases, Dataguard (Physical), and a wide range of other database administration activities.
Thanks for the visits!
Share Learn Grow!