LSA1
Practical 1: Graphical user Interface and Command Line Interface process
a) The Command Line Interface:
1. man : It is used to display the user manual of any command that we can run on the terminal.
man -l
cd
man -k time | grep 8
date 05061256
date
mkdir -create directory
mkdir /tempdir
b) cp : This command is used to copying files from one location to another location.
cp /etc/[abc]* /tempdir
c) ls : It is used to list files or directories in Linux.
ls /
d) man ls : It is used to display the user manual of any command that we can run on the terminal.
man ls
e) ls –t : It is used show the sorted filed modification by time.
ls -t
f) ls –t etc :
ls -t /etc
g) find : It is used to find files and directories.
find / -size +100M
1). Manage processes: A process in Linux is nothing but a program in execution. It’s a
running instance of a program. Any command that you execute starts a process.
i) Manage jobs :
system-config-users
bg: This command in Linux is used to place foreground jobs in background.
bg
jobs
fg: This command in Linux used to put a background job in foreground.
fg
jobs
ii. Parent & Child process:
bash: The Linux Bash is also known as 'Bourne-again Shell.'
ssh: ssh stands for “Secure Shell”. It is a protocol used to securely connect to a remote
server/system.
bash
ssh -X localhost
ps: It is used to list the currently running processes and their PIDs along with some other
information depends on different options.
ps afx
kill: This command is used to terminate the processes manually.
kill 2758
dd if=/dev/zero of=/dev/null & : To create duplicate data(dd) input files(if) of /dev/zero into
output files(of) of /dev/null to run in background(&)
dd if=/dev/zero of=/dev/null & [3] 2295
dd if=/dev/zero of=/dev/null & [4] 2297
dd if=/dev/zero of=/dev/null & [5] 2298
dd if=/dev/zero of=/dev/null & [6] 2299
Top: This command shows a real-time view of running processes in Linux and displays kernel-managed tasks.
top
Press k to kill the process which we have created using dd command.
PID to kill: 2294
Kill PID 2294 witj signal [15]:
As you can see now the process with PID: 2294 has been terminated.
So we will terminate all the processes which we have created above using command dd.
iv. Mail:
su: Switch user(su) lets you switch the current user to any other user.
su - : It lets you to switch the current user into any other user with that user environment.
su - rjcit
crontab -e: To schedule a process and installing a new crontab.
crontab -e
mail: This command is used to show the Cron Daemon.
Comments
Post a Comment