Hello Geeks! Welcome to another informative article on this blog. In this article, we are gonna learn some basic but most important Linux commands that every Computer Science student should know.
You know what? This article is enough to get started with the Linux command line, all the Linux Commands explained here are enough for beginner Linux users.
No doubt, these commands are not enough to master the Linux command line, but yes, these commands are enough to get started with Linux.
So, without wasting much time, let’s see what are those basic Linux commands that you should know as a beginner.
Basic Linux Commands For Beginners
1. File Management Commands
ls | This command shows a list of contents in the current directory |
ls -al | Formatting listing with hidden files |
ls -lt | Sorting the formatted listing by time modification |
pwd | Print current working directory name |
cd | Change to home directory |
cd dir_name | Change directory to “dir_name” |
mkdir dir_name | Create a directory named “dir_name” |
cat >file1 | Places the standard input into the file1 |
more file1 | Output the contents of the file1 |
touch file_name | Create a file named “file_name” |
rm file1 | Deleting the file named “file1” |
rm -r dir | Deleting the directory (folder) named “dir” |
rm -f file1 | Force to remove the “file1” |
rm -rf dir | Force to remove the directory “dir” |
cp file1 file2 | Copy the contents of file1 to file2 |
cp -r dir1 dir2 | Copy dir1 to dir2; create dir2 if not present |
mv file1 file2 | Rename or move file1 to file2, if file2 is an existing file |
ln -s file link | Create symbolic link link to file |
2. Process Management Commands
- ps : To display the currently working processes
- top : Display all running process
- kill pid : Kill the process with given pid
- killall proc : Kill all the process named proc
- pkill pattern : Will kill all processes matching the pattern
- bg : List stopped or background jobs, resume a stopped job in the background
- fg : Brings the most recent job to foreground
- fg n : Brings job “n” to the foreground
3. Searching
- grep pattern file1 : Search for “pattern” in file1
- grep -r pattern dir : Search recursively for pattern in dir
- command | grep pattern : Search pattern in the output of a command
- locate file1 : Find all instances of file1
- find . -name filename : Searches in the current directory (represented by a period) and below it, for files and directories with names starting with “filename”
- pgrep pattern : Searches for all the named processes, that matches with the pattern and, by default, returns their ID
4. System Information
- date : Show the current date and time
- uptime : Show current uptime
- cal : Show this month’s calender
- w : Display who is on line
- whoami : Display the name of logged in user
- finger user : Display information about user
- uname -a : Show kernel information
- cat /proc/cpuinfo : Cpu information
- cat proc/meminfo : Memory information
- man command : Show the manual for a command
- df : Show the disk usage
- du : Show directory space usage
- free : Show memory and swap usage
- whereis app : Show possible locations of app
- which app : Show which applications will be run by default
5. Basic Network Commands
- ping host : Ping host (host ip or domain name) and output results
- whois domain : Get whois information for domains (for example – whois techmosphere.in)
- dig domain : Get DNS information for domain
- dig -x host : Reverse lookup host
- wget file1 : Download file1
- wget -c file1 : Continue a stopped download
6. Compression
- tar cf file1.tar file1 : Create tar named file1.tar containing file1
- tar xf file1.tar : Extract the files from file1.tar
- tar czf file.tar.gz files : Create a tar with Gzip compression
- tar xzf file.tar.gz : Extract a tar using Gzip
- tar cjf file.tar.bz2 : Create tar with Bzip2 compression
- tar xjf file.tar.bz2 : Extract a tar using Bzip2
- gzip file1 : Compresses file1 and renames it to file1.gz
- gzip -d file1.gz : Decompresses file1.gz back to file1
On Android Phone
Don’t have a laptop or PC? Don’t worry, you can practice these commands on your android smartphone with ease. You just need to install kali nethunter on your android phone.
Don’t know how to install kali Linux nethunter on an android phone? Read this article to use Kali Linux on your Android Phone.
Thanks for visiting this blog, if you have any suggestion, feel free share that in the comment section.
Make a blog on How to join a cyber cell and what to study.
And
Is there any scope after becoming ethical hacker in army is there any department in army ?
Sure Man
Make a blog bash script. How I create a git repo for Linux user and our own tools?
9302171878
Hi
HTML code
Hacking