Linux Notes
Linux Notes
en_US.UTF-8
/bin/bash
linuxls -l
12586
Mar 15 2009
su -
mv /home/placy/confid_wh /home/bcassini
At the prompt, type rpm -e ddd-C-Debug and press Enter to uninstall the package.
Type rpm -q ddd-C-Debug and press Enter to verify that the package is installed.
Procedure 1
At the prompt, type su - and press Enter to change to the root user.
Type 1worm4b8 as the root password and press Enter.
Type usermod -l bcassini bcasini and press Enter to change the account name.
Type usermod -d /home/bcassini bcassini and press Enter to change bcassini's home
directory.
Use cat /etc/passwd and press Enter to verify the changes.
Procedure 2
509
Robert Cronn
50
/root
At the prompt, type userdel -r thaslam and press Enter to remove the user account
and the home directory.
Type cat /etc/passwd and press Enter.
Type ls /home and press Enter to verify that the account was removed.
At the prompt, type groups schawla and press Enter to view a list of all groups the
user belongs to. You will see that schawla currently belongs to the mgmt1 and sales
group. The schawla group is the user's primary group.
Type usermod -aG mgmt2,hr schawla and press Enter to add hr and mgmt2 to the
secondary group memberships for the schawla user account.
Type cat /etc/group or groups schawla and press Enter to verify the changes.
At the prompt, type one of the following commands and press Enter to view
information about the network interfaces to determine which card is not up and to
identify the card alias. (The alias for the network interface that is down is
enp2s1.)
ip addr
ip addr show
ip addr show enp2s1
ifconfig -a
Type one of the following commands and press Enter to start the enp2s1 network
interface:
ifup enp2s1
ip link set enp2s1 up
At the prompt, type ip addr show (or ifconfig) and press Enter to view the current
status of the network adapters.
Type cd /etc/sysconfig/network-scripts/ and press Enter.
Type ls and press Enter to view the files in this folder. Take note of ifcfg-enp2s0
and ifcfg-enp2s1 which are the configuration files for the network adapters.
Configure the settings for enp2s0 as follows:
Type nano ifcfg-enp2s0 and press Enter to edit the first adapter.
On the IPADDR line, type 192.168.0.254.
On the NETMASK line, type 255.255.255.0.
On the BROADCAST line, type 192.168.0.255.
On the GATEWAY line, type 192.168.0.5.
Type Ctrl + O.
Press Enter to save the file.
Type Ctrl + X to exit the editor.
Type ip link set enp2s0 down (or ifdown) and press Enter to bring the interface
down.
Type ip link set enp2s0 up (or ifup) and press Enter to bring the interface back up
with the new configuration.
Configure the settings for enp2s1 as follows:
Type nano ifcfg-enp2s1 and press Enter to edit the first adapter.
On the IPADDR line, type 10.0.255.254.
On the NETMASK line, type 255.255.0.0.
On the BROADCAST line, type 10.0.255.255.
On the GATEWAY line, type 0.0.0.0.
Type Ctrl + O.
Press Enter to save the file.
Type Ctrl + X to exit the editor.
Type ip link set enp2s1 down (or ifdown) and press Enter to bring the interface
down.
Type ip link set enp2s1 up (or ifup) and press Enter to bring the interface back up
with the new configuration.
Configure DNS as follows:
Type nano /etc/resolv.conf and press Enter to configure the DNS server addresses.
Type nameserver 163.128.78.93 and press Enter to start a new line.
Type nameserver 163.128.80.93.
Type Ctrl + O.
Press Enter to save the file.
Type Ctrl + X to exit the editor.
Type ping -c 4 192.168.0.5 and press Enter to confirm the connection to the
network.
1st
5th
62191
473632
1st
1st
2.9G
1.1G
52%
100 K
./.config
40 K
18432
20480
500
550
root
10240
9216
20480
wadams
ls /dev/sd*
pvcreate /dev/sdb1 /dev/sdc1
vgcreate data /dev/sdb1 /dev/sdc1
vgs
lvcreate --size 1t -n art data
mkdir product
mkfs.ext4 /dev/data/art
mount -t ext4 /dev/data/art product
cd product
touch newproduct
ls
df -h
mkswap /dev/sdb2
swapon /dev/sdb2
mkdir /mnt/disk
mount -t ext3 /dev/sdb1 /mnt/disk
mount
umount /root/newdrive
mount /dev/sdb2 /mnt/drive2
quotaon /
edquota -u schan
1
soft
delete 9216
1048576
hard
delete 10240
1048576
ctrl _ x
Y
enter
repquota -a
edquota -u -t
1
block grace
delete 7
30
inode grace
delete 7
30
ctrl + x
Y
Enter
repquota -a
bcassini
proj
bcassini
wadams
umask 007
1993.392
1010712
2.6.33.3-85
lsmod
modprobe powermate
lsmod
rmmod gameport
1194
running
2.3
python
crontab -l
crontab -e
1
Press Enter.
Press Enter to create a new line in the editor.
On the new line, type 30 2 * * 2,6 /bin/updatedb.
Press Ctrl + O to write out (save) your changes.
Press Enter to accept the file name.
Press Ctrl + X to exit the editor.
Type crontab -l and press Enter to view the current crontab file.
journalctl -k
q
journalctl -r
2019 01 10
10:14
ss -lt
netstat
enter
nano /etc/apache2/ports.conf
enter
81
8081
Ctrl+O
Enter
Ctrl+X
systemctl restart apache2
enter
ss -lt
enter
netstat
enter
192.168.0.5
198.28.56.1
65.86.24.136
65.86.1.1
163.128.80.93
6
192.168.0.5
73.44.216.14
In the Support Office, begin troubleshooting the problem by verifying the scope of
the connectivity problem as follows:
Under Support Office, select Support.
At the prompt, type ping 192.168.0.5 and press Enter to ping the gateway.
Press Ctrl + C. The ping fails.
Type ping 192.168.0.30 and press Enter to ping the computer in Office 1.
Press Ctrl + C. The ping fails.
Type ifconfig and press Enter to examine the network configuration. The IP
configuration for the network interface is on a different network.
Correct the problem on Support by configuring the network properties for the
interface as follows:
Type nano /etc/sysconfig/network-scripts/ifcfg-enp2s1 and press Enter to edit
the /etc/sysconfig/network-scripts/ifcfg-enp2s1 file to configure the interface.
On the IPADDR line, type 192.168.0.32.
On the BROADCAST line, type 192.168.0.255.
Press Ctrl + O.
Press Enter to save the file.
Press Ctrl + X to exit the editor.
Type ip link set enp2s1 down or ifdown enp2s1 and press Enter to bring the
interface down.
Type ip link set enp2s1 up or ifup enp2s1 and press Enter to bring the interface
back up with the new configuration.
Type ip addr show or ifconfig and press Enter to verify the correct IP address on
the interface.
Type ping 192.168.0.5 and press Enter to verify connectivity to the gateway.
Press Ctrl + C. The ping now succeeds.